pi-bro 0.25.1 → 0.27.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 +50 -0
- package/README.md +18 -11
- package/docs/README.md +2 -0
- package/docs/getting-started.md +2 -2
- package/docs/grill-me.md +63 -0
- package/docs/guided-review.md +4 -4
- package/docs/reference/commands.md +2 -0
- package/docs/reference/data-and-permissions.md +17 -3
- package/docs/reference/settings.md +11 -2
- package/docs/reference/troubleshooting.md +5 -0
- package/docs/remember-me.md +90 -0
- package/package.json +14 -4
- package/src/advisor.ts +4 -2
- package/src/backend.ts +511 -11
- package/src/bro.ts +37 -0
- package/src/btw.ts +55 -9
- package/src/config-ui.ts +149 -51
- package/src/doctor.ts +142 -3
- package/src/explain-modal.ts +6 -2
- package/src/grill-engine.ts +116 -0
- package/src/grill.ts +312 -0
- package/src/remember-engine.ts +141 -0
- package/src/remember-store.ts +193 -0
- package/src/remember-tool.ts +22 -0
- package/src/remember.ts +294 -0
- package/src/settings.ts +85 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to pi-bro are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.27.0] - 2026-10-30
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- `/bro remember-me` helps you write and explicitly approve personal memory entries with a short, scan-friendly statement and expandable context.
|
|
10
|
+
- `about_user` lets the main Pi agent read an overview, find memories by topic, and unfold selected entries without extra model calls.
|
|
11
|
+
- Memory-writing guidance preserves conditions, scope, source, exceptions, user attribution and unresolved conflicts across short and expanded views.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Private Remember Me modal: `/save`, `/list`, `/expand`, `/edit`, `/delete`, `/new`, `/help`.
|
|
16
|
+
- Versioned local store with stable IDs, validated entries, bounded file size, revision checks and atomic writes.
|
|
17
|
+
- Focused tests and `docs/remember-me.md`.
|
|
18
|
+
|
|
19
|
+
### Limits
|
|
20
|
+
|
|
21
|
+
- Automatic semantic conflict detection depends on model judgment and is not exhaustive.
|
|
22
|
+
- External CLI agents do not receive the main Pi `about_user` tool automatically.
|
|
23
|
+
- The old `/bro preferences` file remains separate until a reviewed migration; no automatic import occurs.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [0.26.0] - 2026-10-20
|
|
27
|
+
|
|
28
|
+
### Highlights
|
|
29
|
+
|
|
30
|
+
- Run any Bro feature on **Pi itself**: a new `pi` backend drives an in-process Pi SDK session with your own Pi models and credentials. No extra CLI to install.
|
|
31
|
+
- `/bro config` is now two steps: pick the backend, then its model. Esc steps back without saving.
|
|
32
|
+
- Pi is the safest review option alongside Claude and Muse: Guided Review gets file-only tools and no shell.
|
|
33
|
+
|
|
34
|
+
### Breaking
|
|
35
|
+
|
|
36
|
+
- **pi-bro now requires Pi `>=1.3.0`** (previously `>=0.84.2`). The Pi backend is built on SDK APIs introduced after 0.84.2 — `SettingsManager.getSettings()`, `ModelRuntime.getAllModels()` and seeded `SessionManager.inMemory(cwd, { id }, entries)` (1.0.0), and the `disabledBuiltinExtensions` resource-loader option (1.1.0) — so an older host cannot load the extension at all. Update Pi before upgrading pi-bro; the five CLI backends need no other change. `pi-floor` in CI now pins 1.3.0, the oldest supported version.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- New `pi` backend for `explain`, `show`, `elevate`, `btw` (restricted and full), `advisor`, and Guided Review. It runs `createAgentSession` inside this process, uses your Pi model registry and configured credentials, and needs no CLI.
|
|
41
|
+
- `/bro config` two-step picker: step 1 chooses the backend (Default for capability overrides, Agy, Claude, Grok, Codex, Muse, Pi), step 2 chooses that backend's model. Esc in step 2 returns to step 1 without saving; a selection only saves on a complete model pick. The Agy family list and the Pi catalog load independently, so `/bro config` works when Agy is offline.
|
|
42
|
+
- Pi model choices come from your configured scoped models (`enabledModels`), falling back to every model with configured credentials. Virtual (`pi-virtual`) models are filtered out and cannot be selected.
|
|
43
|
+
- A `/bro doctor` Pi section that checks the selected physical model, its auth and scope membership, the effective effort, and the curated tool set for each capability, all without a CLI spawn or a live model turn.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- Guided Review accepts `pi` as a file-only backend (read/grep/find/ls, no shell) alongside Claude and Muse, and no longer treats it as a shell-capable sandbox. Its session also ignores the captured checkout's `.pi/settings.json`, `.pi/SYSTEM.md` and `.pi/APPEND_SYSTEM.md`, so a PR cannot steer settings or inject system instructions for the review. Host-untrusted workspaces get the same protection.
|
|
48
|
+
- Pi `btw` keeps its side session in memory only (nothing written under `~/.pi/agent/sessions`), resumes it within the same mode and preferences, and drops it on a `/mode` switch or preferences change, matching Agy. An expired or evicted side conversation now fails loudly instead of silently restarting without its history.
|
|
49
|
+
- Settings version 2 accepts `"backend": "pi"` with a `"<provider>/<id>"` model (split on the first `/` only). A malformed custom model ID is reported in the field instead of throwing out of `/bro config`.
|
|
50
|
+
- Pi model choices come from your configured scoped models (`enabledModels`), falling back to every model with configured credentials. The catalog now includes models authenticated by runtime keys, so the picker offers everything a run can actually use. Virtual (`pi-virtual`) models are filtered out and cannot be selected.
|
|
51
|
+
- Pi `btw` and `advisor` runs are raced against the deadline and cancellation latch, so an uncooperative provider can no longer hold the caller or start a model request after its deadline.
|
|
52
|
+
- `/bro doctor` now computes and reports the effective Pi reasoning effort (`requested → effective` only when they differ) instead of claiming a clamp it never checked, and describes both BTW access modes. Scoped-model `:thinking` suffixes are honoured when the Bro effort is `default`.
|
|
53
|
+
- Docs, README, and `/bro help` document the Pi backend and the two-step picker.
|
|
54
|
+
|
|
5
55
|
## [0.25.1] - 2026-10-19
|
|
6
56
|
|
|
7
57
|
### Highlights
|
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@ For a first success, type this in Pi after setting up a backend:
|
|
|
49
49
|
| `/bro` | Explains the agent's latest completed reply (requires one) |
|
|
50
50
|
| `/bro btw What is a race condition?` | Asks a private side question |
|
|
51
51
|
| `/bro show` | Draws the current session's recent conversation, if any |
|
|
52
|
+
| `/bro grill-me Should agents talk freely to each other?` | Questions your assumptions privately, one at a time |
|
|
52
53
|
| `/bro elevate Improve how we search company documents` | Find expert gaps before giving Pi a task |
|
|
53
54
|
|
|
54
55
|
File and webpage examples need your own real path or URL; see [how to explain them](docs/features/explain.md#explain-a-document). For a step-by-step first run, see [Getting started](docs/getting-started.md).
|
|
@@ -60,8 +61,10 @@ File and webpage examples need your own real path or URL; see [how to explain th
|
|
|
60
61
|
| `/bro`, `/bro text`, `/bro file`, `/bro url` | **[Explain](docs/features/explain.md).** A plain-language version of the agent's last reply, pasted text, a PDF/DOCX/Markdown file, or a public webpage. Three modes: `brief`, `balanced`, `faithful`. |
|
|
61
62
|
| `/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. |
|
|
62
63
|
| `/bro elevate` or **Ctrl+Shift+E** | **[Elevate](docs/elevate.md).** Discover missing expert considerations, select useful improvements, and rewrite your task without submitting it. Shares BTW backend settings. |
|
|
64
|
+
| `/bro remember-me [thought]` | **[Remember Me](docs/remember-me.md).** Privately clarify and approve short personal memories with unfoldable background. Agents can call `about_user` to read summaries and expand IDs. |
|
|
65
|
+
| `/bro grill-me` | **[Grill Me](docs/grill-me.md) (experimental).** A private, opinionated decision interview: light, balanced or exhaustive; one question per round; `/consolidate` drafts a brief without ending the interview; `/insert-last-message` explicitly returns the latest reply to the editor. Uses BTW model settings; read-only restrictions vary by backend. |
|
|
63
66
|
| `/bro btw` | **[Side questions](docs/features/btw.md#bro-btw-side-conversation).** A separate conversation seeded with recent context, so you can ask without interrupting the agent. ⚠️ [Full-permission mode](#what-leaves-your-machine) can edit files. |
|
|
64
|
-
| `/bro guided-review <PR>` | **[Guided Review](docs/guided-review.md).** An explanation and quality assessment of a GitHub PR, with ranked findings, source evidence and private questions. Claude or
|
|
67
|
+
| `/bro guided-review <PR>` | **[Guided Review](docs/guided-review.md).** An explanation and quality assessment of a GitHub PR, with ranked findings, source evidence and private questions. Claude, Muse, or Pi is recommended for untrusted PRs. |
|
|
65
68
|
| `bro_advisor` tool | **[Second opinion](docs/features/advisor.md#bro-advisor).** A tool your agent can call mid-task; a fresh backend process reviews the session snapshot, can inspect the workspace when needed, and returns advice to the agent. ⚠️ [Runs with permissions bypassed](#what-leaves-your-machine). |
|
|
66
69
|
| `/bro config`, `/bro preferences` | **[Settings](docs/reference/settings.md#settings) and [preferences](docs/user-guide.md#preferences).** Pick the backend, model and effort per feature, and tell Bro how you like answers. |
|
|
67
70
|
|
|
@@ -72,11 +75,10 @@ Guided Review has its own [guide](docs/guided-review.md).
|
|
|
72
75
|
|
|
73
76
|
## Requirements
|
|
74
77
|
|
|
75
|
-
- Pi `>=
|
|
78
|
+
- Pi `>=1.3.0` and Node.js `>=22.19.0`.
|
|
76
79
|
- macOS or Linux. Windows is untested; there, cancelling stops only the
|
|
77
80
|
backend's direct process, not anything it started.
|
|
78
|
-
- At least one backend
|
|
79
|
-
You only need the one you use:
|
|
81
|
+
- At least one backend on your `PATH`, signed in once from your terminal, **or the built-in Pi backend**. You only need the one you use:
|
|
80
82
|
|
|
81
83
|
| Backend | CLI | Notes |
|
|
82
84
|
| --- | --- | --- |
|
|
@@ -85,9 +87,10 @@ Guided Review has its own [guide](docs/guided-review.md).
|
|
|
85
87
|
| [Grok Build](https://docs.x.ai/build/overview) | `grok` | Guided Review uses its read-only sandbox (shell-enabled). |
|
|
86
88
|
| [Codex CLI](https://github.com/openai/codex) | `codex` | Guided Review uses its read-only sandbox (shell-enabled). |
|
|
87
89
|
| [Muse Code](https://dev.meta.ai/docs/muse-code) | `muse` | Works for every feature; strict file-only inspection for Guided Review. |
|
|
90
|
+
| **Pi** (in-process) | none | Runs a Pi SDK session inside this process using your Pi models and credentials. No extra install. Restricted features get no tools; Guided Review is file-only; the advisor and full-access BTW get workspace tools. |
|
|
88
91
|
|
|
89
92
|
- Guided Review also needs Git and an authenticated [`gh`](https://cli.github.com/).
|
|
90
|
-
Claude or
|
|
93
|
+
Claude, Muse, or Pi is recommended for untrusted PRs (strict file-only inspection); Codex, Grok and Agy run with shell available under their sandbox, with an advisory.
|
|
91
94
|
- [PiG](docs/pig-compatibility.md) support is experimental.
|
|
92
95
|
|
|
93
96
|
## What leaves your machine
|
|
@@ -101,21 +104,25 @@ which may keep it under their own policies. Paths below are under
|
|
|
101
104
|
| Explain | The agent's last reply, your pasted text, or text extracted from your file or webpage, plus your preferences | Nothing; the last result stays in memory |
|
|
102
105
|
| Show | User and assistant text from recent turns (no tool calls, tool results, reasoning or images), plus your preferences | Diagram pages in `pi-bro-<uid>/` in your system temp folder |
|
|
103
106
|
| Side questions | Your questions and up to the last 8 turns of conversation text, plus your preferences | Nothing; the thread stays in memory |
|
|
107
|
+
| Grill Me | Topic, interview turns, up to the last 8 main-session text turns and preferences; any workspace files the selected inspector reads | Nothing; interview and brief are in memory |
|
|
104
108
|
| Elevate | Your objective, selected findings, all current-branch user/assistant text; Full also includes tool-call arguments and text results, and preferences | Nothing; the workflow stays in memory |
|
|
105
109
|
| Guided Review | The PR description and diff, the files the backend reads, your questions, plus your preferences | Reviews and captured source in `bro-reviews/`, with no automatic cleanup |
|
|
106
110
|
| Advisor | The agent's system instructions, tool list and whole conversation, including tool calls and results (reasoning and images omitted), plus your steering | Steering in `bro-advisor.md` and the session file |
|
|
107
111
|
|
|
108
112
|
`/bro url` also connects straight to the website, which sees your IP address.
|
|
109
|
-
Bro runs each CLI as you, with your environment. It never reads or copies
|
|
110
|
-
provider credentials, but
|
|
111
|
-
keys set in your environment.
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
Bro runs each CLI as you, with your environment. It never reads or copies an
|
|
114
|
+
external CLI's provider credentials, but a CLI signs in its own way, which can
|
|
115
|
+
include API keys set in your environment. The built-in **Pi** backend is the
|
|
116
|
+
exception: it runs in-process, so it reads your Pi `auth.json` and reuses your
|
|
117
|
+
Pi provider credentials for the model you select. Nothing Bro produces enters
|
|
118
|
+
Pi's conversation unless you insert it, except advisor answers, which return to
|
|
119
|
+
the agent as tool results.
|
|
114
120
|
|
|
115
121
|
> [!WARNING]
|
|
116
122
|
> These run the backend in your workspace with its permission checks bypassed:
|
|
117
123
|
> - **Advisor:** it can read, edit and run commands. "Advise, don't edit" is
|
|
118
124
|
> only an instruction.
|
|
125
|
+
> - **Grill Me `/access full`:** explicitly opts into unrestricted workspace permissions. The no-edits prompt is not an access control.
|
|
119
126
|
> - **BTW full-permission mode** (turned on with `/mode` inside BTW): it is
|
|
120
127
|
> meant to edit files and run commands.
|
|
121
128
|
> - **Grok:** its sandbox is off except during Guided Review, which uses the
|
|
@@ -135,7 +142,7 @@ and [Privacy and safety](docs/reference/data-and-permissions.md#privacy-and-safe
|
|
|
135
142
|
- No fallback: if the chosen backend, model or effort fails, Bro shows that
|
|
136
143
|
backend's error instead of switching. → Run `/bro doctor`.
|
|
137
144
|
- 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.
|
|
138
|
-
- BTW threads and the last explanation live in memory only and clear on
|
|
145
|
+
- BTW and Grill Me threads and the last explanation live in memory only and clear on
|
|
139
146
|
reload or restart.
|
|
140
147
|
- Guided Review runs in local interactive Pi only and does not post to
|
|
141
148
|
GitHub.
|
package/docs/README.md
CHANGED
|
@@ -13,6 +13,8 @@ Start with what you want to do. The [README](../README.md) explains the product,
|
|
|
13
13
|
- [Explain a local file](features/explain.md#explain-a-document) or [webpage](features/explain.md#explain-a-webpage).
|
|
14
14
|
- [Visualize a conversation](features/show.md#bro-show) — Show diagrams.
|
|
15
15
|
- [Ask a private side question](features/btw.md#bro-btw-side-conversation) — BTW.
|
|
16
|
+
- [Remember personal context for agents](remember-me.md) — approved short memories, expandable background and the read-only `about_user` tool.
|
|
17
|
+
- [Get grilled on a decision](grill-me.md) — one question at a time in a private modal, then copy a decision brief.
|
|
16
18
|
- [Improve a request before sending it](elevate.md) — Elevate: discover expert gaps, choose improvements, rewrite the task.
|
|
17
19
|
- [Investigate a PR](guided-review.md) — Guided Review.
|
|
18
20
|
- [Get an agent's second opinion](features/advisor.md#bro-advisor) — Advisor; review its permissions first.
|
package/docs/getting-started.md
CHANGED
|
@@ -4,7 +4,7 @@ Pi-bro helps you understand agent replies, ask side questions, and review work w
|
|
|
4
4
|
|
|
5
5
|
## 1. Install
|
|
6
6
|
|
|
7
|
-
You need **Pi**, Node.js 22.19.0 or later, and one supported backend
|
|
7
|
+
You need **Pi**, Node.js 22.19.0 or later, and one supported backend already installed and signed in (Agy, Claude, Grok, Codex, or Muse) — or the built-in **Pi** backend, which uses your Pi session's own models and needs no extra CLI. See [requirements](../README.md#requirements).
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
pi install npm:pi-bro
|
|
@@ -44,4 +44,4 @@ See the [docs home](README.md) for detailed workflows.
|
|
|
44
44
|
|
|
45
45
|
## Data and access before you use Bro at work
|
|
46
46
|
|
|
47
|
-
Bro sends your selected text and some context to the backend CLI and model provider you configure. BTW and the advisor have different access rules; some modes can read or change local files. Read [What leaves your machine](../README.md#what-leaves-your-machine) and the [backend access matrix](reference/data-and-permissions.md#backends-access-and-retention) before using private data. A model prompt saying 'do not access' is not a security boundary.
|
|
47
|
+
Bro sends your selected text and some context to the backend CLI and model provider you configure. BTW and the advisor have different access rules; some modes can read or change local files. The Pi backend runs in-process but still sends the prompt to whichever Pi model provider you select. Read [What leaves your machine](../README.md#what-leaves-your-machine) and the [backend access matrix](reference/data-and-permissions.md#backends-access-and-retention) before using private data. A model prompt saying 'do not access' is not a security boundary.
|
package/docs/grill-me.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Grill Me (experimental)
|
|
2
|
+
|
|
3
|
+
[Docs home](README.md) · [Commands](reference/commands.md) · [Safety](reference/data-and-permissions.md)
|
|
4
|
+
|
|
5
|
+
`/bro grill-me` opens an independent decision interview in Bro's modal, without adding turns to Pi's main conversation.
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
/bro grill-me Should child agents communicate freely?
|
|
9
|
+
/bro grill-me
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
With a topic, start a new interview. Without one, reopen the current interview or enter a topic inside the modal. A proposal prompts scrutiny; an open question prompts discovery. Bro offers reasoned pushback, then one question with lettered choices, including an open-ended alternative. Answer with a letter or your own words. Questions request a horizontal divider, a distinct **Question** heading, and exactly one **(Recommended)** option with a short reason. Recommendations are provisional; model adherence is not guaranteed.
|
|
13
|
+
|
|
14
|
+
## How Bro works with you
|
|
15
|
+
|
|
16
|
+
Grill Me is a **context-rich thinking partner**, not a review pipeline. It can help you discover a position from an open question or test a proposal you already have. If you propose a solution before explaining the problem, Bro looks for the goal and constraints that matter; when those are already clear, it uses them rather than repeating an intake checklist.
|
|
17
|
+
|
|
18
|
+
Bro contributes options and reasons, asks about the most consequential choice still open, and may inspect relevant workspace material when its backend permits it. It should check available facts rather than guessing, ask *you* about preferences and trade-offs, and explain meaningful uncertainty. Good arguments can persuade Bro; it should not invent objections to prolong the interview.
|
|
19
|
+
|
|
20
|
+
As the discussion develops, Bro treats your **agreed choices and reasons** differently from untested assumptions and Bro's own suggestions. You can correct or change a constraint in normal conversation. Bro should carry that change forward and avoid reopening settled ground without a reason.
|
|
21
|
+
|
|
22
|
+
`/consolidate` captures the current position for a handoff, at whatever level of detail the topic warrants: goals, key constraints, endorsed decisions and why, material trade-offs, unresolved questions, and a next step. It does not promote Bro's recommendations into decisions you never made. You can consolidate early, then continue and consolidate again.
|
|
23
|
+
|
|
24
|
+
This takes inspiration from the context-rich **Elephant** in Google's [Elephant–Goldfish Model](https://github.com/google/elephant-goldfish-model). Grill Me does **not** dispatch Goldfish reviewers, require a design document, or impose review/approval stages. It remains one dialogue in Bro's modal.
|
|
25
|
+
|
|
26
|
+
## Controls
|
|
27
|
+
|
|
28
|
+
| Command inside the modal | Effect |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `/consolidate` | Generate a current decision brief. Does not end the interview or insert anything. |
|
|
31
|
+
| `/insert-last-message` | Insert the latest completed Bro reply, including a consolidated brief, into an empty Pi editor **without sending**. No model call. |
|
|
32
|
+
| `/depth light` | Quick, focused questioning |
|
|
33
|
+
| `/depth balanced` | Default: material assumptions and trade-offs |
|
|
34
|
+
| `/depth exhaustive` | Deeper alternatives, evidence and failure cases |
|
|
35
|
+
| `/retry` | Retry the failed/cancelled operation, otherwise regenerate the latest reply. Never repeats insertion. |
|
|
36
|
+
| `/new <topic>` | Start over after confirmation. Resets depth to balanced and access to inspection. |
|
|
37
|
+
| `/access inspect` | Request inspection tools; enforcement depends on backend |
|
|
38
|
+
| `/access full` | Request full permissions; requires typing `yes` after a warning |
|
|
39
|
+
| `/help` | Show commands on demand; **Esc returns to the interview** |
|
|
40
|
+
| Esc | Close and cancel active work; preserve completed discussion |
|
|
41
|
+
|
|
42
|
+
Type `/` to see matching commands; keep typing to narrow suggestions and press **Tab** to complete the first match. Completion never submits. From help, Esc returns to the discussion; a second Esc closes the modal.
|
|
43
|
+
|
|
44
|
+
For confirmation prompts, type `yes` to proceed; anything else cancels. Depth can change between replies without losing the discussion. There are no question quotas or finished/locked states. Consolidate whenever useful, inspect the brief, then explicitly insert it or continue talking. The brief includes the current position, reasons, objections, unresolved questions and next actions. Insertion never overwrites a draft or submits it.
|
|
45
|
+
|
|
46
|
+
The old `/finish`, `/copy`, `/copy-all`, `/insert`, `/insert-all`, `/clear`, and entry depth flags have been removed from this experimental interface. BTW commands are unchanged.
|
|
47
|
+
|
|
48
|
+
Grill Me uses the **BTW model/backend/effort** selection from `/bro config`, but has its own independent thread. The header shows depth and effective access; `/help` keeps the footer short. Full access and Agy write risks remain visible in the header even when another notice is shown.
|
|
49
|
+
|
|
50
|
+
## Access, privacy and limits
|
|
51
|
+
|
|
52
|
+
- Inspection uses the Guided Review backend path in your current workspace. Claude, Muse and Pi have file-only tools. Codex and Grok have read-only sandboxes with shell access. **Agy inspection can still write project files.** No-edit prompts are not security controls.
|
|
53
|
+
- Full access can read, edit and execute commands. Bro instructs the model not to make changes, but cannot enforce that instruction. There is no automatic escalation.
|
|
54
|
+
- Each turn makes a fresh backend call replaying the complete interview. Long interviews cost more and may exceed context limits; there is no hidden truncation or fallback.
|
|
55
|
+
- The provider receives your topic, interview history, Bro preferences and up to eight recent main-session user/assistant text turns (40,000 characters). Captured context excludes tool calls/results, hidden reasoning and images. Backend tools can inspect additional workspace content.
|
|
56
|
+
- Bro keeps the interview in memory, lost on reload, session change or exit. Backend/provider retention is separate; see [backend retention](reference/data-and-permissions.md#backends-access-and-retention).
|
|
57
|
+
- Closing discards partial output, preserves completed replies, and restores cancelled input unless a newer draft exists. Retry preserves the previous reply until replacement succeeds. Cancellation cannot undo backend changes; descendant cleanup on Windows and abrupt host shutdown are not guaranteed.
|
|
58
|
+
|
|
59
|
+
## Comparison
|
|
60
|
+
|
|
61
|
+
BTW is for side questions. Elevate improves an assignment. Grill Me tests a decision through dialogue. Its advantage over a standalone questioning skill is modal isolation and explicit return to Pi, not a claim of smarter questioning.
|
|
62
|
+
|
|
63
|
+
See the [evaluation record](plans/grill-me-evaluation.md). Historical live results predate the command redesign and multiple-choice guidance; they do not validate the revised experience.
|
package/docs/guided-review.md
CHANGED
|
@@ -6,7 +6,7 @@ The normal journey is: **open a PR → read and investigate → leave when satis
|
|
|
6
6
|
|
|
7
7
|
## Open a review
|
|
8
8
|
|
|
9
|
-
Requirements: local Pi interactive mode, Git, authenticated GitHub CLI (`gh`), and a configured review backend (Claude or
|
|
9
|
+
Requirements: local Pi interactive mode, Git, authenticated GitHub CLI (`gh`), and a configured review backend (Claude, Muse, or Pi is recommended for untrusted PRs). Run `gh auth status` to check GitHub authentication; `/bro doctor` checks Bro's selected backend setup and shows an advisory when the review backend uses a shell-capable sandbox, without proving GitHub access or model connectivity.
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
12
|
/bro guided-review https://github.com/OWNER/REPO/pull/123
|
|
@@ -83,9 +83,9 @@ Use Overview → Regenerate guide only when you want a fresh explanation/assessm
|
|
|
83
83
|
|
|
84
84
|
## Access, privacy and storage
|
|
85
85
|
|
|
86
|
-
Review never runs with full-access or bypass flags. **Claude and
|
|
86
|
+
Review never runs with full-access or bypass flags. **Claude, Muse, and Pi provide strict file-only inspection** and are recommended for untrusted PRs: Claude runs with `--restricted`, Read/Grep/Glob only, `dontAsk`, safe mode and no MCP; Muse disables write, shell and web tools, foreign personal context and native session logs, without trusting repository rules; Pi runs in-process with `read/grep/find/ls` only, no shell, and an isolated session. No model-run project tests, commands, Git or network tools are available on Claude, Muse, or Pi.
|
|
87
87
|
|
|
88
|
-
**Codex, Grok and Agy run with shell available inside their own sandbox**, and each sandbox is different: Codex and Grok apply a read-only sandbox (`codex exec --sandbox read-only --ephemeral`, `grok --sandbox read-only --permission-mode dontAsk`), while Agy's `--sandbox` only restricts terminal commands and still lets them write inside the project. All three inspect the captured checkout with a 10-minute review deadline, and **none is shell-free**. When one of these backends is selected for review, Bro shows an advisory during acquisition, in the live review workspace, and in `/bro doctor` (as a non-fatal informational note). Set the **review** override to Claude or
|
|
88
|
+
**Codex, Grok and Agy run with shell available inside their own sandbox**, and each sandbox is different: Codex and Grok apply a read-only sandbox (`codex exec --sandbox read-only --ephemeral`, `grok --sandbox read-only --permission-mode dontAsk`), while Agy's `--sandbox` only restricts terminal commands and still lets them write inside the project. All three inspect the captured checkout with a 10-minute review deadline, and **none is shell-free**. When one of these backends is selected for review, Bro shows an advisory during acquisition, in the live review workspace, and in `/bro doctor` (as a non-fatal informational note). Set the **review** override to Claude, Muse, or Pi in `/bro config` for untrusted PRs; saved reviews remain readable with any backend. Unsupported/older CLI flags fail visibly; there is no bypass fallback.
|
|
89
89
|
|
|
90
90
|
Captured evidence is read from pinned Git blobs, so a shell-capable backend that writes inside the checkout cannot alter the code shown as evidence — but it can still change what it later reads, so treat very large changes with suspicion when using Agy.
|
|
91
91
|
|
|
@@ -108,7 +108,7 @@ One open writer per review is supported within a Pi process. Concurrent editing
|
|
|
108
108
|
| Problem | What to do |
|
|
109
109
|
| --- | --- |
|
|
110
110
|
| GitHub unavailable when reopening | Use bare `/bro guided-review` to choose a saved review; the picker does not fetch |
|
|
111
|
-
| Sandboxed shell review backend (Codex, Grok, Agy) | Advisory shown; choose Claude or
|
|
111
|
+
| Sandboxed shell review backend (Codex, Grok, Agy) | Advisory shown; choose Claude, Muse, or Pi in `/bro config` for strict file-only inspection on untrusted PRs |
|
|
112
112
|
| Git/gh authentication or fetch error | Read the acquisition error; check Git/`gh auth status`; retry explicitly |
|
|
113
113
|
| Invalid/failed preparation | Changed files remain available; use Prepare guide to retry when ready for another call |
|
|
114
114
|
| Failed regeneration | Current guide is kept; retry only if you want another call |
|
|
@@ -35,6 +35,8 @@ text directly captures a new source the same way.
|
|
|
35
35
|
| `/bro config` | Open settings for the shared backend/model/effort, explain mode, show turns, and per-capability (explain/show/btw/advisor/review) overrides. |
|
|
36
36
|
| `/bro guided-review <PR number or URL>` | Automatically explain and assess a captured PR in local Pi, with source evidence and optional private questions. Opening the same PR restores its saved review. |
|
|
37
37
|
| `/bro guided-review` | List saved reviews; `resume` is an alias. |
|
|
38
|
+
| `/bro remember-me [thought]` | Start a private memory-writing conversation, browse and expand memories, and approve saves explicitly. [Guide](../remember-me.md). |
|
|
39
|
+
| `/bro grill-me [topic]` | Private one-question-at-a-time decision interview. Supply a topic to start fresh; omit it to resume. `/consolidate` drafts a brief; `/insert-last-message` inserts explicitly without sending. `/help` lists modal controls. [Guide](../grill-me.md). |
|
|
38
40
|
| `/bro elevate [request]` | Improve an assignment before execution. Discover up to five gaps, choose useful findings, and insert a revised request without submitting it. **Ctrl+Shift+E** can use your unsent draft. See [Elevate](../elevate.md). |
|
|
39
41
|
| `/bro btw [question]` | Open a side conversation in a modal, seeded with recent main-session context. Starts conversation-only; type `/mode` inside to toggle full permission (read and edit the workspace) without losing the thread. |
|
|
40
42
|
| `/bro advisor` | Quick notice of whether the executor's `bro_advisor` tool is available right now, pointing at `/bro config`, `/bro advisor-steer`, and `/bro doctor`. |
|
|
@@ -9,6 +9,10 @@ credentials, and does not copy credentials or rewrite backend configuration.
|
|
|
9
9
|
Each backend and your model provider may retain sessions, logs, and request
|
|
10
10
|
data under their own settings and policies.
|
|
11
11
|
|
|
12
|
+
The **Pi** backend is the in-process exception: it does not spawn a CLI. It runs a
|
|
13
|
+
Pi SDK session inside the host process using your own Pi model registry and its
|
|
14
|
+
configured credentials, so it uses the same account route as your Pi session.
|
|
15
|
+
|
|
12
16
|
| | Explain / show | BTW conversation-only | BTW full permission | Advisor | Guided Review |
|
|
13
17
|
| --- | --- | --- | --- | --- | --- |
|
|
14
18
|
| **Agy** | Temporary directory, Agy sandbox | Temporary directory, Agy sandbox | Workspace, permissions bypassed | Fresh workspace process, permissions bypassed | Captured checkout, Agy sandbox (shell and in-project writes allowed; advisory) |
|
|
@@ -16,6 +20,7 @@ data under their own settings and policies.
|
|
|
16
20
|
| **Grok** | Temporary directory, **prompt instruction only** | Workspace, **prompt instruction only** | Workspace, permissions bypassed | Fresh workspace process, permissions bypassed | Captured checkout, read-only sandbox (shell-enabled; advisory) |
|
|
17
21
|
| **Codex** | Scratch directory, read-only sandbox, ephemeral session | Workspace, read-only sandbox | Workspace, approvals and sandbox bypassed | Fresh workspace process, approvals and sandbox bypassed | Captured checkout, read-only sandbox, ephemeral (shell-enabled; advisory) |
|
|
18
22
|
| **Muse** | Scratch directory, approval/write/shell disabled, no session log | Workspace, approval/write/shell disabled | Workspace, permissions bypassed (`--yolo`) | Fresh workspace process, permissions bypassed (`--yolo`) | Captured checkout; writes/shell/web disabled, no session log |
|
|
23
|
+
| **Pi** | No tools at all (isolated in-process session) | No tools at all | Workspace, read/bash/edit/write (no nested delegation or MCP) | Workspace, read/bash/edit/write (no nested delegation or MCP) | Captured checkout, read/grep/find/ls only (no shell) |
|
|
19
24
|
|
|
20
25
|
- Grok always runs explain, show, btw and the advisor with its sandbox off and
|
|
21
26
|
permissions bypassed; its tools, hooks, skills, plugins, and MCP may remain
|
|
@@ -41,7 +46,15 @@ data under their own settings and policies.
|
|
|
41
46
|
including across `/mode` switches. An Agy conversation stays bound to the
|
|
42
47
|
workspace it started in, so after a `/mode` switch — or whenever a thread
|
|
43
48
|
has turns but no native session ID — Bro starts a fresh native session
|
|
44
|
-
seeded with the main-session context and every earlier turn.
|
|
49
|
+
seeded with the main-session context and every earlier turn. Pi keeps its side
|
|
50
|
+
session in memory only (nothing is written under `~/.pi/agent/sessions`) and,
|
|
51
|
+
like Agy, drops it on a `/mode` switch.
|
|
52
|
+
- Pi runs in-process with no CLI, no extensions, no skills, no prompt templates,
|
|
53
|
+
no context files, MCP or codemode, and auto-retry and compaction disabled. Its
|
|
54
|
+
Guided Review uses read/grep/find/ls only and cannot run shell commands, and it
|
|
55
|
+
ignores the captured checkout's `.pi/settings.json` so an untrusted PR cannot
|
|
56
|
+
steer the reviewing session. In restricted explain/show/elevate/btw it has no
|
|
57
|
+
tools at all.
|
|
45
58
|
- Cancellation, deadlines, and invalid output streams stop the backend's
|
|
46
59
|
process group on POSIX, escalating after a five-second grace period. On
|
|
47
60
|
Windows only the direct child is targeted. Detached shell work or external
|
|
@@ -53,7 +66,7 @@ data under their own settings and policies.
|
|
|
53
66
|
When resolving backend, model, and reasoning effort:
|
|
54
67
|
1. **Per-capability override**: `overrides.<capability>` (`explain`, `show`, `btw`, `advisor`, or `review`) pins that capability's complete selection.
|
|
55
68
|
2. **Shared default**: otherwise the capability inherits `default` (root `model`/`effort` in older flat files).
|
|
56
|
-
3. **
|
|
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.
|
|
57
70
|
4. **Initial file creation only**: `PI_BRO_MODEL` has no effect once the settings file exists.
|
|
58
71
|
|
|
59
72
|
When resolving turn count for `/bro show`:
|
|
@@ -80,7 +93,8 @@ When shaping an answer, each part has one owner:
|
|
|
80
93
|
seeded main-session conversation text (plus earlier turns when a native
|
|
81
94
|
session is reseeded) to the selected backend. In full permission mode the
|
|
82
95
|
side agent can additionally read and edit the workspace.
|
|
83
|
-
- **
|
|
96
|
+
- **Grill Me requests**: `/bro grill-me` sends the user-supplied topic, their answers, the full private Grill Me transcript so far, preferences, and up to 8 recent main-session text turns (40,000 characters) to the BTW-selected provider. It runs **fresh** each turn in the current workspace, via the Guided Review *inspection execution path* (not the Guided Review UI or checkout). Claude, Muse and Pi use file-only tools; Codex and Grok use a read-only sandbox with shell; **Agy can still write inside the project**. The model is always told not to edit or run mutating commands, but that prompt is not enforced. Optional `/access full` explicitly uses a fresh, full-permission backend call and gives the backend unrestricted tools; it never happens automatically. Grill Me and BTW hold separate in-memory threads, and nothing enters the main agent unless the user inserts it into an empty editor. See [Grill Me](../grill-me.md).
|
|
97
|
+
- **Guided Review requests**: PR identity/description, captured diff, relevant private discussion and preferences go to the selected backend, which can inspect captured files. Main-session context is not attached. Claude (`--restricted`, file tools only), Muse (write/shell/web disabled), and Pi (`read/grep/find/ls` only, in-process) use strict file-only inspection and are recommended for untrusted PRs. Codex and Grok inspect the captured checkout under a read-only sandbox; Agy's `--sandbox` still allows in-project writes. All three run shell commands and show an advisory. Prompt injection can still corrupt conclusions or reveal captured content to the provider; this is not a general confidentiality guarantee. See [Guided Review access and storage](../guided-review.md#access-privacy-and-storage).
|
|
84
98
|
- **Preferences**: `bro-preferences.md` is sent with every explain, Show,
|
|
85
99
|
BTW, Elevate, and Guided Review request to the selected backend. It is never sent to the advisor or
|
|
86
100
|
to Pi's main model.
|
|
@@ -32,7 +32,8 @@ Settings live in this user-editable file, created when the extension loads
|
|
|
32
32
|
"showTurns": 1,
|
|
33
33
|
"overrides": {
|
|
34
34
|
"explain": { "backend": "claude", "model": "sonnet", "effort": "medium" },
|
|
35
|
-
"advisor": { "backend": "grok", "model": "grok-4.7", "effort": "high" }
|
|
35
|
+
"advisor": { "backend": "grok", "model": "grok-4.7", "effort": "high" },
|
|
36
|
+
"review": { "backend": "pi", "model": "anthropic/claude-sonnet-4-5", "effort": "high" }
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
```
|
|
@@ -47,7 +48,11 @@ Bro reads the file again before each request, so manual edits apply next time.
|
|
|
47
48
|
model decide). Agy selections are normalized against Agy's installed model
|
|
48
49
|
catalog. Claude, Grok, Codex, and Muse accept seeded or custom model IDs; a model/effort
|
|
49
50
|
combination the account does not support fails with the backend's own error
|
|
50
|
-
instead of silently falling back.
|
|
51
|
+
instead of silently falling back. **Pi** selections are a `"<provider>/<id>"` pair
|
|
52
|
+
from your Pi model catalog, chosen from your configured scoped models
|
|
53
|
+
(`enabledModels`, falling back to every model with configured credentials).
|
|
54
|
+
Explicit Pi efforts are clamped to the model's supported reasoning levels; the
|
|
55
|
+
picker's own step 1 chooses the backend and step 2 the model.
|
|
51
56
|
- `mode` is `brief`, `balanced` (the default), or `faithful`. `showTurns` is
|
|
52
57
|
the default number of turns `/bro show` draws (default 1); `/bro show
|
|
53
58
|
<n-turns>` overrides it for one run.
|
|
@@ -106,3 +111,7 @@ that is set):
|
|
|
106
111
|
`bro-prompt.md`, the full prompt template from earlier versions, is no longer
|
|
107
112
|
read. Move what you want to keep into `/bro preferences`, and choose
|
|
108
113
|
`/bro mode brief` for the original ELI-simpleton instruction.
|
|
114
|
+
|
|
115
|
+
## Remember Me
|
|
116
|
+
|
|
117
|
+
`/bro remember-me` manages approved personal memories in `bro-memories.json` in the same user agent directory. Each entry has a stable ID, a scan-first short statement, and optional scope, exceptions, uncertainty and source context in an expanded view. The agent-facing `about_user` tool reads them on demand. `/bro preferences` remains a separate legacy file; no automatic migration or duplicate injection occurs. See [Remember Me](../remember-me.md).
|
|
@@ -16,6 +16,11 @@ feature. Failed checks explain what to fix.
|
|
|
16
16
|
- **Codex**: installed version and configured authentication.
|
|
17
17
|
- **Muse**: installed version only; authentication and connectivity are not
|
|
18
18
|
verified.
|
|
19
|
+
- **Pi**: physical model catalog, configured authentication, scope membership,
|
|
20
|
+
effective reasoning effort, and each feature's tool set. Uses the in-process
|
|
21
|
+
SDK with host registrations and runtime credentials plus current on-disk
|
|
22
|
+
models/auth; workspace settings follow the host's trust decision. No CLI or
|
|
23
|
+
connectivity probe runs.
|
|
19
24
|
|
|
20
25
|
Doctor never sends source text or runs a model completion. A successful check
|
|
21
26
|
confirms the setup but cannot guarantee that a later provider request will
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Remember Me
|
|
2
|
+
|
|
3
|
+
[Docs home](README.md) · [Commands](reference/commands.md) · [Preferences](reference/settings.md#preferences)
|
|
4
|
+
|
|
5
|
+
Use `/bro remember-me` to browse your approved personal memories, or `/bro remember-me <thought>` to start drafting from your words and recent Pi conversation.
|
|
6
|
+
|
|
7
|
+
## Write through conversation
|
|
8
|
+
|
|
9
|
+
Bro reviews your statement and existing memories. It may ask one material question, flag a competing entry, or propose a short statement with deeper background. **Nothing saves until you type `/save`.** You can reply normally to refine a proposal. When you correct it, the old draft remains visible but cannot be approved until Bro returns a revised proposal. Questions and failed model calls never silently re-enable `/save`.
|
|
10
|
+
|
|
11
|
+
A proposed memory always has:
|
|
12
|
+
- **Subject:** a distinct topic, such as Testing or Delegation
|
|
13
|
+
- **Short statement:** active, clear and usable on its own; include qualifications that change its meaning
|
|
14
|
+
- **Expanded background:** context, explanations and original wording; optional scope, exceptions, source context, uncertainty and whether wording reflects a user statement or user-approved interpretation
|
|
15
|
+
|
|
16
|
+
Use the same vocabulary across related memories. Put useful distinguishing words first. Never convert “prefers lean tests” into “dislikes tests,” or “autonomy within an approved plan” into “unrestricted autonomy.” Summaries and expanded content must agree.
|
|
17
|
+
|
|
18
|
+
If the user hasn't resolved a conflict, don't pretend it is settled. Bro shows a potential conflict in the proposal. The user decides whether to revise it, update an existing memory or save a qualified entry.
|
|
19
|
+
|
|
20
|
+
## Controls
|
|
21
|
+
|
|
22
|
+
| Input | Action |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| Free text | Continue clarifying or refining |
|
|
25
|
+
| `/save` | Approve and persist the current proposal |
|
|
26
|
+
| `/list [page|all]` | Page through the current search (20 per page), or use `/list all` to return to all memories; preserve the proposal |
|
|
27
|
+
| `/search <words>` | Start a filtered search; `/list 2` continues its second page without dropping the proposal |
|
|
28
|
+
| `/expand <id>` | Show background, source, scope, exceptions and uncertainty |
|
|
29
|
+
| `/edit <id>` | Edit an existing memory while keeping its stable ID |
|
|
30
|
+
| `/delete <id>` | Delete after typing yes |
|
|
31
|
+
| `/context show|on|off` | See or omit the captured Pi context before transmitting |
|
|
32
|
+
| `/confirm-revision` | Approve after comparing a stale proposal with changed memories |
|
|
33
|
+
| `/new` | Discard the draft without changing saved memories |
|
|
34
|
+
| `/help` | Explain commands and boundaries |
|
|
35
|
+
|
|
36
|
+
Before the first model call, Bro identifies the selected model/backend, the captured main-session context, and that related saved memories and legacy style preferences will be sent. The initial thought is prefilled but not sent until the user presses Enter. Use `/context show` to inspect what was captured or `/context off` to omit it.
|
|
37
|
+
|
|
38
|
+
Browsing and failed saves preserve the proposal. If the store changed after the proposal was reviewed, `/save` compares the original and current target (and related entries) and **does not save**. An explicit `/confirm-revision` approves against that exact new revision; if it changes again, another review is required. Durable drafts across restarts are not implemented.
|
|
39
|
+
|
|
40
|
+
Esc closes the modal and cancels an active model call. The draft conversation is not durable; **approved saved memories are durable**. Saved entries survive Pi restarts and project changes.
|
|
41
|
+
|
|
42
|
+
## Agent access
|
|
43
|
+
|
|
44
|
+
The main Pi agent gets a read-only `about_user` tool:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
about_user() → short statements and IDs
|
|
48
|
+
about_user({query:"testing"}) → matching summaries
|
|
49
|
+
about_user({offset:20,limit:20}) → next page of memories
|
|
50
|
+
about_user({expand:["m-..."]}) → approved background for an ID
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The agent can scan a summary before deciding what to unfold. The reader performs no new model call. It does not mutate stored entries. The user's current request wins over a standing memory.
|
|
54
|
+
|
|
55
|
+
## Boundaries
|
|
56
|
+
|
|
57
|
+
Stored memories live in `~/.pi/agent/bro-memories.json` (or under `$PI_CODING_AGENT_DIR`), not project Git repos. Files are personal: keep private backups and avoid sharing them in logs. Selected model providers receive the words you provide to Remember Me, recent session text captured at opening, and existing memory statements for conflict checking. Read-only `about_user` returns only the requested summaries/expansions to the calling main Pi agent; that agent may send returned content to its model provider.
|
|
58
|
+
|
|
59
|
+
**Agent access is currently the registered main Pi tool only.** External CLIs and isolated Bro sessions do not receive it automatically. The existing `/bro preferences` file remains unchanged; no automatic migration or conflict reconciliation is claimed.
|
|
60
|
+
|
|
61
|
+
Remember Me uses **the backend and model selected for BTW**. Every valid BTW backend is supported through Bro's existing restricted **explain** execution path. It never silently changes provider or model. Restricted means different things across backends, not a universal promise of no tools or no side effects:
|
|
62
|
+
|
|
63
|
+
| Backend | Current restricted drafting behavior |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| Agy (default) | `--sandbox`, temporary working directory. Sandbox limits shell actions; it is **not** a no-tools or no-write guarantee. |
|
|
66
|
+
| Codex | `--sandbox read-only`, ephemeral execution and temporary working directory; read-only sandbox, **not** no-tools. |
|
|
67
|
+
| Claude | CLI tools disabled with `--tools ""`, strict empty MCP config, temporary working directory, no session persistence. |
|
|
68
|
+
| Pi | Fresh SDK session with no tools, extensions, skills, or project context files, using the **selected configured physical model**. |
|
|
69
|
+
| Muse | Write and shell disabled, approvals disabled, temporary working directory. Do not infer that all other abilities are disabled. |
|
|
70
|
+
| Grok | A restricted **prompt request**, but CLI sandbox off and permissions bypassed; it is **not** a technical tool/write boundary. |
|
|
71
|
+
|
|
72
|
+
The modal shows a backend-specific notice before sending data. Bro's `/save` gate controls **only writes to its approved memory store**. It does not prevent any action that the selected backend's own permissions might allow. See [execution configuration](reference/settings.md) for backend details.
|
|
73
|
+
|
|
74
|
+
Live model behavior and the actual backend installation are separate from controlled-response tests.
|
|
75
|
+
|
|
76
|
+
**Coexistence policy:** `/bro preferences` remains active as a legacy *answer-style* file for older Bro features. `about_user` reads only approved Remember Me memories. Current user instructions take precedence. If an approved memory conflicts with legacy preferences, the approved memory is the source for the personal fact or lasting rule; do not treat two conflicting stores as equally authoritative. Bro should surface the disagreement during drafting. There is no silent migration or overwrite; a reviewed migration remains a separate task.
|
|
77
|
+
|
|
78
|
+
## Examples
|
|
79
|
+
|
|
80
|
+
**Short:** `Testing: Seek sufficient confidence at the lowest reasonable maintenance cost; do not optimize for raw test count.`
|
|
81
|
+
|
|
82
|
+
**Expanded:** The user values tests that protect meaningful behavior and rejects needless duplication. This does **not** mean the user dislikes tests. Scope: project test strategy. Source: explicit user preference.
|
|
83
|
+
|
|
84
|
+
**Short:** `Delegation: Allow agents to act independently within an approved coordination plan; reserve consequential scope changes for human approval.`
|
|
85
|
+
|
|
86
|
+
**Expanded:** The user wants strong initiative after authorizing the plan, not unrestricted delegation. An agent can coordinate approved subtasks but should return for approval when changing agreed goals or major commitments.
|
|
87
|
+
|
|
88
|
+
**Short:** `Answer length: Lead with a short answer; give enough detail for consequential design reviews. [Apparent tension: brevity versus depth depends on task.]`
|
|
89
|
+
|
|
90
|
+
**Expanded:** “Keep answers concise” and “go deep on important trade-offs” are not necessarily conflicting. Their scope differs: routine replies versus material design decisions. Preserve that distinction rather than deciding the user dislikes detailed work.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-bro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.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",
|
|
@@ -48,6 +48,12 @@
|
|
|
48
48
|
"src/btw.ts",
|
|
49
49
|
"src/elevate.ts",
|
|
50
50
|
"src/elevate-engine.ts",
|
|
51
|
+
"src/grill.ts",
|
|
52
|
+
"src/grill-engine.ts",
|
|
53
|
+
"src/remember-store.ts",
|
|
54
|
+
"src/remember-engine.ts",
|
|
55
|
+
"src/remember-tool.ts",
|
|
56
|
+
"src/remember.ts",
|
|
51
57
|
"src/explain-modal.ts",
|
|
52
58
|
"src/review.ts",
|
|
53
59
|
"src/review-source.ts",
|
|
@@ -72,6 +78,8 @@
|
|
|
72
78
|
"docs/pig-compatibility.md",
|
|
73
79
|
"docs/guided-review.md",
|
|
74
80
|
"docs/elevate.md",
|
|
81
|
+
"docs/grill-me.md",
|
|
82
|
+
"docs/remember-me.md",
|
|
75
83
|
"docs/examples.md",
|
|
76
84
|
"docs/features",
|
|
77
85
|
"docs/reference"
|
|
@@ -85,7 +93,7 @@
|
|
|
85
93
|
"scripts": {
|
|
86
94
|
"docs:check": "node scripts/check-docs.mjs && node --test test/docs-quality.test.mjs",
|
|
87
95
|
"typecheck": "tsc --noEmit",
|
|
88
|
-
"test": "npm run typecheck && npm run docs:check && node .github/scripts/release-utils.mjs selftest && node --test test/elevate-docs.test.mjs test/elevate.test.ts test/review-ux.test.mjs test/review-doctor.test.mjs test/review-versions.test.mjs test/review-regeneration.test.mjs test/review-modal.test.mjs test/review.test.ts test/review-ui.test.mjs test/review-session.test.mjs test/helpers.test.mjs test/prompt.test.ts test/backend.test.ts test/claude.test.ts test/grok.test.ts test/codex.test.ts test/muse.test.ts test/settings.test.ts test/sources.test.ts test/release.test.ts test/show-html.test.ts test/smoke-rpc.test.ts test/ui-capabilities.test.ts test/modal-contract.test.mjs benchmark/*.test.ts && sh ./test/smoke-test.sh",
|
|
96
|
+
"test": "npm run typecheck && npm run docs:check && node .github/scripts/release-utils.mjs selftest && node --test test/elevate-docs.test.mjs test/elevate.test.ts test/grill.test.ts test/remember.test.ts test/remember-modal.test.mjs test/review-ux.test.mjs test/review-doctor.test.mjs test/review-versions.test.mjs test/review-regeneration.test.mjs test/review-modal.test.mjs test/review.test.ts test/review-ui.test.mjs test/review-session.test.mjs test/helpers.test.mjs test/prompt.test.ts test/backend.test.ts test/claude.test.ts test/grok.test.ts test/codex.test.ts test/muse.test.ts test/settings.test.ts test/sources.test.ts test/release.test.ts test/show-html.test.ts test/smoke-rpc.test.ts test/ui-capabilities.test.ts test/modal-contract.test.mjs benchmark/*.test.ts && sh ./test/smoke-test.sh",
|
|
89
97
|
"benchmark:dry-run": "node benchmark/run.ts dry-run",
|
|
90
98
|
"benchmark:run": "node benchmark/run.ts run",
|
|
91
99
|
"benchmark:report": "node benchmark/run.ts report",
|
|
@@ -98,13 +106,15 @@
|
|
|
98
106
|
"image": "https://raw.githubusercontent.com/tranhoangnguyen03/pi-bro/main/docs/images/social-preview.png"
|
|
99
107
|
},
|
|
100
108
|
"peerDependencies": {
|
|
109
|
+
"@earendil-works/pi-ai": "*",
|
|
101
110
|
"@earendil-works/pi-coding-agent": "*",
|
|
102
111
|
"@earendil-works/pi-tui": "*",
|
|
103
112
|
"typebox": "*"
|
|
104
113
|
},
|
|
105
114
|
"devDependencies": {
|
|
106
|
-
"@earendil-works/pi-
|
|
107
|
-
"@earendil-works/pi-
|
|
115
|
+
"@earendil-works/pi-ai": "1.3.0",
|
|
116
|
+
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
117
|
+
"@earendil-works/pi-tui": "1.3.0",
|
|
108
118
|
"@types/node": "^24.0.0",
|
|
109
119
|
"typebox": "1.3.27",
|
|
110
120
|
"typescript": "6.0.3"
|
package/src/advisor.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { ExtensionAPI, ExtensionContext, SessionEntry } from "@earendil-wor
|
|
|
4
4
|
import { convertToLlm, getAgentDir, getMarkdownTheme } from "@earendil-works/pi-coding-agent";
|
|
5
5
|
import { Container, Markdown, Text } from "@earendil-works/pi-tui";
|
|
6
6
|
import { Type } from "typebox";
|
|
7
|
-
import { execute as executeBackend, type BackendSelection } from "./backend.ts";
|
|
7
|
+
import { execute as executeBackend, setPiHostContext, type BackendSelection } from "./backend.ts";
|
|
8
8
|
import { MAX_ADVISOR_STEERING_CHARS, buildAdvisorPrompt } from "./prompt.ts";
|
|
9
9
|
import { type BackendName, readSettings, selectionForCapability } from "./settings.ts";
|
|
10
10
|
import { errorMessage, isRecord } from "./util.ts";
|
|
@@ -376,7 +376,7 @@ export function advisorAttemptLabel(details: AdvisorToolDetails): string {
|
|
|
376
376
|
return `Bro advisor · ${details.model ?? "unknown model"} · ${Math.ceil((details.durationMs ?? details.elapsedMs) / 1_000)}s`;
|
|
377
377
|
}
|
|
378
378
|
const latest = details.activity?.at(-1);
|
|
379
|
-
const backendLabel = details.backend === "claude" ? "Claude" : details.backend === "grok" ? "Grok" : details.backend === "codex" ? "Codex" : details.backend === "muse" ? "Muse" : "Agy";
|
|
379
|
+
const backendLabel = details.backend === "claude" ? "Claude" : details.backend === "grok" ? "Grok" : details.backend === "codex" ? "Codex" : details.backend === "muse" ? "Muse" : details.backend === "pi" ? "Pi" : "Agy";
|
|
380
380
|
// "last reported" + freshness, never a claim about what the backend is doing right now and never
|
|
381
381
|
// "stalled" -- silence since lastActivityAt is not itself evidence of a stuck run.
|
|
382
382
|
const activityLabel = latest
|
|
@@ -404,6 +404,8 @@ export function registerAdvisorTool(pi: ExtensionAPI): void {
|
|
|
404
404
|
),
|
|
405
405
|
}),
|
|
406
406
|
async execute(_toolCallId, params, signal, onUpdate, ctx) {
|
|
407
|
+
// The in-process Pi backend needs the host registry; publish it before any consultation.
|
|
408
|
+
setPiHostContext(ctx);
|
|
407
409
|
const state = resolveAdvisorState(ctx.sessionManager.getBranch());
|
|
408
410
|
const durableSteering = await readAdvisorSteering();
|
|
409
411
|
const settings = await readSettings();
|