pi-bro 0.37.0 → 0.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/overthink.md CHANGED
@@ -1,66 +1,27 @@
1
1
  # Overthink — private second look
2
2
 
3
- Overthink gives Pi's work a small, skeptical second pass. It checks the direction, the evidence, the risks and the next move, without making a new agent or interrupting the original conversation. It is inspired by [pi-heads-up](https://github.com/Pringled/pi-extensions/tree/main/packages/pi-heads-up).
3
+ This guide moved to [Overthink](features/overthink.md). The links below take you to the corresponding sections.
4
4
 
5
5
  ## Normal use
6
6
 
7
- With **automatic checks on** (the factory default), after a **fully settled substantial task** (currently at least three tool results across the run), Overthink sends one extra private assessment to the **same active Pi model, at the same thinking level**. A short note appears above the input only if there is something material to flag. If the reply already covered the issue, or there is nothing important to add, Overthink stays quiet. A question-only turn is not enough to trigger a check.
8
-
9
- Run `/bro overthink` to **view** the latest assessment. Opening the modal makes **no model request**. The notes never enter Pi's user/assistant conversation and do not direct the agent to perform work.
7
+ [Normal use](features/overthink.md#normal-use)
10
8
 
11
9
  ## Four factory questions
12
10
 
13
- A new session starts with four questions:
14
-
15
- 1. **Direction:** Are we solving the right problem and moving toward the intended outcome?
16
- 2. **Evidence:** What important assumptions or conclusions might be wrong or insufficiently verified?
17
- 3. **Risks:** What material risks, unintended changes, or needless complexity have we introduced?
18
- 4. **Next move:** What correction, decision, or next step would most improve the outcome?
19
-
20
- Bro still permits up to 32 custom questions and does **one same-model call for the entire list**. When nothing material is missed, the model should answer `NONE` and Overthink stays quiet. Otherwise it must return a brief 2–3-sentence summary followed by **one concise answer for each saved question**, in order, written in plain, everyday words for a tired reader. Saved [preferences](reference/settings.md#preferences) (`bro-preferences.md`) can adjust tone or answer language on top, without overriding the JSON format, sentence limits, plain-language brevity or review rules. A question without a material concern can say so; it need not invent criticism.
21
-
22
- **Existing saved global and per-session question lists do not change automatically.** To adopt the four new factory questions, reset the global defaults (Ctrl+D twice, Ctrl+S), then reset the session list (Ctrl+D twice, Ctrl+S). User-edited lists remain intact, even when they contain the former seven questions.
11
+ [Four factory questions](features/overthink.md#four-factory-questions)
23
12
 
24
13
  ## Viewer
25
14
 
26
- The modal shows a compact check date/model/freshness line, followed by **Summary** and numbered question–answer sections. The original question wording is visible. For the four factory questions, the sections are labeled Direction, Evidence, Risks and Next move. Longer results scroll; short results no longer expand into a mostly empty frame. Earlier plain-text notes stay viewable without being misrepresented as answers to the new questions.
27
-
28
- In the modal:
29
-
30
- - **Ctrl+R** — force a fresh assessment (also works for smaller tasks). A check uses the **current** session context.
31
- - **Ctrl+E** — edit the questions for **this Pi session**.
32
- - **?** — show or hide help.
33
- - **U** — show or hide full token/cache/estimated-cost usage details (hidden by default).
34
- - **Ctrl+C** — copy the latest findings.
35
- - **Esc** — close or leave Help.
36
- - **↑/↓** — scroll.
37
-
38
- If the last assessment found nothing, the modal says so. The note records the model-relevant session entry it assessed. When a later task (even a trivial turn), compaction, context edit, or branch move changes that position, the viewer explicitly marks the old note **OUTDATED**. Older notes without position metadata are marked **source position not recorded**. Editing questions also marks an existing note as using earlier questions.
15
+ [Viewer](features/overthink.md#viewer)
39
16
 
40
17
  ## Question editor
41
18
 
42
- The same ordered, editable list is used in both places:
43
-
44
- - **Global defaults:** `/bro config → Features → Overthink → Default questions`.
45
- - **Automatic checks:** `/bro config → Features → Overthink → Automatic checks` toggles the global on/off switch. It starts **On**. Turning it off does not delete questions or notes; the viewer and manual **Ctrl+R** still work.
46
- - **Session questions:** `/bro overthink`, then **Ctrl+E**.
47
-
48
- Use **↑/↓** to choose an entry; **Enter** to edit; **Ctrl+N** to add; **Ctrl+X** to delete; **Ctrl+↑/↓** to reorder; **Ctrl+S** to save; **Esc** to cancel. Saving an empty list disables checks. Unsaved changes are protected by a second-Esc warning.
49
-
50
- **Ctrl+D** twice resets the editor draft. In the global editor it restores Bro's factory questions; in the session editor it restores the **current global defaults**. Press Ctrl+S to save that reset. A new session inherits the current global defaults once and can then be edited independently. Existing sessions do not change when the global defaults are updated.
19
+ [Question editor](features/overthink.md#question-editor)
51
20
 
52
21
  ## Model, cache and privacy
53
22
 
54
- Overthink **never** uses the BTW or Bro backend/model setting. It calls Pi's current `modelRegistry.streamSimple` using `buildSessionProjection()` plus a single appended private review instruction. It uses the active physical session model and reasoning level, makes **one call for all questions**, **never executes tools**, and does not add the assessment to the main model context. The request may still contain Pi's tool descriptions as part of the original context; the prompt tells the model to respond in text and not call tools. An unexpected tool-use response is treated as a failed check, not executed. The call sends the session context (including tool evidence exposed by Pi's projection) to that model's provider, under the provider's data policy.
55
-
56
- This largely preserves the request prefix and **can** reuse provider prompt-cache input. The benefit varies by provider, model, elapsed time, tool/context changes, other extensions' context hooks, and prompt-cache policy. It does not replicate every live Pi context modification. In Pi 1.3 and 1.5, `context_with_system` can observe a prepared context just before a provider call, while `before_provider_request` can observe a provider-specific payload; neither provides a portable, complete, settled-session request that can simply be appended and replayed through `streamSimple`. A recorded pre-call context also lacks the final agent response that Overthink needs to review. Bro therefore keeps the explicit projection path until a real provider-side comparison shows a safe improvement. **A cached prefix is not free:** high thinking effort can add substantial reasoning tokens on top of the visible-output limit, and both output and reasoning can cost money. Press **U** in the viewer to show *provider-reported* input, cache-read, cache-write, output and reasoning tokens when available; the details are hidden during normal reading. It labels USD cost separately as **estimated cost** from Pi's model price table, not a provider-billed amount; subscription or OAuth users may pay differently. A reported cache-read value of **0** could mean no hit **or unsupported caching**; it is not proof that caching works. Some providers report no usage fields. Check actual billed cost before treating Overthink as cheap.
57
-
58
- New structured assessments include the exact question snapshot used for that check, so later edits do not relabel earlier answers. Saved notes made by older versions remain plain text. Invalid or incomplete structured model outputs are rejected rather than shown under the wrong question.\n\nOverthink stores editable global defaults in `getAgentDir()/bro-overthink-defaults.json` and session questions plus the **latest** private check in Pi session `custom` entries (`bro-overthink`). Those entries are outside LLM prompts. Session forks inherit their branch's last state; later edits are independent. The viewer resolves only the **latest** note. Pi stores session custom entries by appending, so **each completed check adds another entry to the session file**, even though Bro does not provide a history browser or archive. This is a deliberate reuse of Pi's branch-aware persistence, not a claim that only one physical record exists. Keep this storage growth in mind for long sessions. It does not write to your project files.
23
+ [Model, cache and privacy](features/overthink.md#model-cache-and-privacy)
59
24
 
60
25
  ## Limits and verification
61
26
 
62
- - The second look is self-criticism by the **same** model; it is not an independent external review. Use `bro_advisor` when a genuinely separate view matters.
63
- - An automatic check can fail without an on-screen error; it must not disturb the main run. Force retry in the modal to see the error.
64
- - Automatic work is triggered at Pi's `agent_settled` lifecycle event (supported from Pi 1.3), not `agent_end`. The earlier event collects tool-use evidence; only a normal final settlement, without queued messages, may start the check. A new agent turn, model change, question edit or session navigation cancels or invalidates stale checks. A returned note is not proof that every listed concern is true.
65
- - Running Heads-up and Overthink together can cause **two extra calls** after a substantive turn. Disable one if that cost is not wanted.
66
- - Host events and cache accounting vary. See [manual qualification](TESTING.md) before claiming live TUI, PiG or cache-cost behavior.
27
+ [Limits and verification](features/overthink.md#limits-and-verification)
@@ -40,9 +40,9 @@ These tests load the extension from its source checkout in the **real PiG host**
40
40
 
41
41
  ## Codex provider-route regression and diagnostic parity
42
42
 
43
- [Codex 0.165.0 offline regression](../test/codex-subscription-real.test.mjs) is a separate source CI lane. It creates an isolated temporary `CODEX_HOME` with **synthetic ChatGPT login tokens**, selects a custom `model_provider` with an API-key `env_key`, and starts a local HTTP listener. A deliberate subscription selection must fail in both Bro execution and `/bro doctor`; the local server must see **zero** requests. This verifies a real CLI configuration path, not a live account or subscription billing. The fallback guarantee is limited to the effective provider configuration that Codex exposes through `config/read`; if Codex cannot report its effective route, Bro stops before execution. Doctor uses the same effective environment and checks.
43
+ [Codex 0.165.0 offline regression](https://github.com/tranhoangnguyen03/pi-bro/blob/main/test/qualification/codex-subscription-real.mjs) is a separate source CI lane. It creates an isolated temporary `CODEX_HOME` with **synthetic ChatGPT login tokens**, selects a custom `model_provider` with an API-key `env_key`, and starts a local HTTP listener. A deliberate subscription selection must fail in both Bro execution and `/bro doctor`; the local server must see **zero** requests. This verifies a real CLI configuration path, not a live account or subscription billing. The fallback guarantee is limited to the effective provider configuration that Codex exposes through `config/read`; if Codex cannot report its effective route, Bro stops before execution. Doctor uses the same effective environment and checks.
44
44
 
45
- **Codex 0.165.0 default + network-discovery regression:** The [real CLI test](../test/codex-subscription-real.test.mjs) now covers a normal `CODEX_HOME/config.toml` with **no `model_provider` field** and checks that both the subscription preflight and Doctor accept it. It also checks explicit `openai`, custom `env_key` providers, trusted-project `model_provider` keys that Codex deliberately ignores, and a redirected `openai_base_url`. The test's local HTTP server must receive **zero requests of any method**, including discovery `GET /v1/models`, during these preflight probes. This verifies the selected model endpoint on Codex 0.165.0; it is not a blanket guarantee against unrelated Codex startup network traffic. The static catalog is an **inspection-only input**: it is not a model source or auth override for real inference. A passing preflight still does not verify a live subscription call or billing.
45
+ **Codex 0.165.0 default + network-discovery regression:** The [real CLI test](https://github.com/tranhoangnguyen03/pi-bro/blob/main/test/qualification/codex-subscription-real.mjs) now covers a normal `CODEX_HOME/config.toml` with **no `model_provider` field** and checks that both the subscription preflight and Doctor accept it. It also checks explicit `openai`, custom `env_key` providers, trusted-project `model_provider` keys that Codex deliberately ignores, and a redirected `openai_base_url`. The test's local HTTP server must receive **zero requests of any method**, including discovery `GET /v1/models`, during these preflight probes. This verifies the selected model endpoint on Codex 0.165.0; it is not a blanket guarantee against unrelated Codex startup network traffic. The static catalog is an **inspection-only input**: it is not a model source or auth override for real inference. A passing preflight still does not verify a live subscription call or billing.
46
46
 
47
47
  ## Reproducible acceptance on the *packaged* shell
48
48
 
@@ -25,7 +25,7 @@ Bro follows the host's `getAgentDir()`: normally `~/.pi/agent` on Pi and `~/.pig
25
25
  - **PiG 0.3.0 RPC does not enforce `--exclude-tools`.** Excluded tools may remain active and reach provider requests. This is not a sandbox boundary. Use an explicit `--tools` allowlist instead; do not rely on `/bro doctor` to prove exclusion. Bro does not mask this defect by falsely reporting an active tool as unavailable.
26
26
  - The smoke suite retains Pi's strict exclusion assertion. The PiG lane has an explicit version-specific expected failure; a changed result fails the lane so the exception must be reviewed/removed.
27
27
  - Elevate is not yet qualified end-to-end on PiG. Interactive behavior, keyboard shortcut delivery and clipboard Copy must be checked on PiG before claiming support.
28
- - Guided Review currently targets local Pi interactive mode. Its capture/reading/question/regeneration journey is not qualified on PiG or RPC/Desktop; existing Bro PiG checks do not establish review support. See [current review scope](guided-review.md#not-available-yet).
28
+ - Guided Review currently targets local Pi interactive mode. Its capture/reading/question/regeneration journey is not qualified on PiG or RPC/Desktop; existing Bro PiG checks do not establish review support. See [current review scope](features/guided-review.md#not-available-yet).
29
29
  - Mouse-wheel forwarding is not qualified; use keyboard scrolling.
30
30
  - Remote/SSH OSC 52 clipboard forwarding is not qualified. Local clipboard behavior depends on the host and installed platform utilities.
31
31
  - Windows support is not qualified by these checks.
@@ -43,10 +43,10 @@ Typing `/bro ` displays ten task-level suggestions: `simplify`, `show`, `btw`, `
43
43
  | `/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. |
44
44
  | `/bro guided-review` | List saved reviews; `resume` is an alias. |
45
45
  | `/bro guided-review delete [PR number or URL]` | Choose and confirm deletion of a saved review and its captured source. Without a target, opens the saved-review picker. |
46
- | `/bro remember-me [thought]` | Start a private memory-writing conversation, browse and expand memories, and approve saves explicitly. [Guide](../remember-me.md). |
47
- | `/bro overthink` | View the latest private automatic second-look notes, without a model call. Ctrl+R retry, Ctrl+E edit session questions, U usage details, ? help, Ctrl+C copy. [Guide](../overthink.md). |
48
- | `/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; `/copy` copies the latest reply or brief; Pi's editor stays untouched. `/help` lists modal controls. [Guide](../grill-me.md). |
49
- | `/bro elevate [request]` | Improve an assignment before execution. Discover up to five gaps, choose useful findings, and copy the revised request. Pi's editor is never changed. **Ctrl+Shift+E** can use your unsent draft. See [Elevate](../elevate.md). |
46
+ | `/bro remember-me [thought]` | Start a private memory-writing conversation, browse and expand memories, and approve saves explicitly. [Guide](../features/remember-me.md). |
47
+ | `/bro overthink` | View the latest private second-look notes, without a model call. Ctrl+R retry, Ctrl+E edit session questions, U usage details, ? help, Ctrl+C copy. [Guide](../features/overthink.md). |
48
+ | `/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; `/copy` copies the latest reply or brief; Pi's editor stays untouched. `/help` lists modal controls. [Guide](../features/grill-me.md). |
49
+ | `/bro elevate [request]` | Improve an assignment before execution. Discover up to five gaps, choose useful findings, and copy the revised request. Pi's editor is never changed. **Ctrl+Shift+E** can use your unsent draft. See [Elevate](../features/elevate.md). |
50
50
  | `/bro btw [question]` | Open a side conversation in a modal, seeded with recent main-session context. Starts conversation-only; `/mode` toggles full workspace access; `/copy` and `/copy-all` copy the latest answer or full thread. |
51
51
  | `/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`. |
52
52
  | `/bro advisor-steer` | View, edit, save, or clear the one persistent steering brief the advisor always sees. |
@@ -96,19 +96,19 @@ See [feature guide](../features/architecture.md).
96
96
 
97
97
  - **Copy Markdown:** `/bro copy` reads the last completed assistant reply from the current Pi session and lets you edit it in a temporary modal. Preview renders locally. Ctrl+C writes to the system clipboard, which other apps may read. No backend request, saved file, session record, or Pi message changes.
98
98
 
99
- - **Overthink requests:** after a substantive Pi turn, Bro makes one additional provider call using Pi's active model and current session conversation projection (including exposed tool evidence), appending the current session's questions and any saved `bro-preferences.md` (for tone and language only). Overthink never executes tool calls. It may still send tool descriptions copied from Pi's existing context to support cache reuse; a tool-use response is rejected without executing the tool. The provider may retain input under its policy. Results and questions are stored in private Pi session custom entries, not LLM turns; global questions use `bro-overthink-defaults.json` in the agent home. This cannot promise a cache hit or fixed incremental cost. Features → Overthink has an on/off switch (on by default). The viewer displays provider-reported input/cache-read/cache-write/output/reasoning tokens and USD cost when available; a reported cache-read value of zero may mean either a cache miss or unsupported caching. See [Overthink](../overthink.md).
99
+ - **Overthink requests:** when you trigger a manual check, or after a substantive Pi turn if you opted into automatic checks, Bro makes one additional provider call using Pi's active model and current session conversation projection (including exposed tool evidence), appending the current session's questions and any saved `bro-preferences.md` (for tone and language only). Overthink never executes tool calls. It may still send tool descriptions copied from Pi's existing context to support cache reuse; a tool-use response is rejected without executing the tool. The provider may retain input under its policy. Results and questions are stored in private Pi session custom entries, not LLM turns; global questions use `bro-overthink-defaults.json` in the agent home. This cannot promise a cache hit or fixed incremental cost. Features → Overthink has an on/off switch (off by default). The viewer displays provider-reported input/cache-read/cache-write/output/reasoning tokens and USD cost when available; a reported cache-read value of zero may mean either a cache miss or unsupported caching. See [Overthink](../features/overthink.md).
100
100
 
101
101
  - **External requests**: Bro sends the latest completed assistant response,
102
102
  pasted text, extracted document text, extracted webpage text, or recent
103
103
  session conversation text (tool calls, tool results, reasoning, and images
104
104
  omitted) to the selected backend and its configured model provider.
105
- - **Elevate requests**: `/bro elevate` sends your objective, preferences, and all user/assistant text on the current branch by default, without a fixed history cap. Its visible Context switch can include tool-call arguments and text results (Full), potentially including sensitive file contents or command output. Both modes exclude hidden reasoning and image binaries. Only explicit Retry after a context-overload error trims older history; the UI discloses reduced context. Its optional rewrite call includes only approved findings. It makes fresh restricted calls through the BTW model setting, but a backend's restricted mode is not a universal file/network sandbox (Grok restrictions are prompt-only). Elevate never edits or submits Pi's main draft. The user may copy the revision and paste it manually. See the [Elevate guide](../elevate.md).
105
+ - **Elevate requests**: `/bro elevate` sends your objective, preferences, and all user/assistant text on the current branch by default, without a fixed history cap. Its visible Context switch can include tool-call arguments and text results (Full), potentially including sensitive file contents or command output. Both modes exclude hidden reasoning and image binaries. Only explicit Retry after a context-overload error trims older history; the UI discloses reduced context. Its optional rewrite call includes only approved findings. It makes fresh restricted calls through the BTW model setting, but a backend's restricted mode is not a universal file/network sandbox (Grok restrictions are prompt-only). Elevate never edits or submits Pi's main draft. The user may copy the revision and paste it manually. See the [Elevate guide](../features/elevate.md).
106
106
  - **Side conversation requests**: `/bro btw` sends your side questions and the
107
107
  seeded main-session conversation text (plus earlier turns when a native
108
108
  session is reseeded) to the selected backend. In full permission mode the
109
109
  side agent can additionally read and edit the workspace.
110
- - **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).
111
- - **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).
110
+ - **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](../features/grill-me.md).
111
+ - **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](../features/guided-review.md#access-privacy-and-storage).
112
112
  - **Preferences**: `bro-preferences.md` is sent with every explain, Show,
113
113
  BTW, Elevate, Grill Me, Guided Review, and Overthink request. It is never sent to the advisor or
114
114
  added to Pi's main conversation.
@@ -127,7 +127,7 @@ See [feature guide](../features/architecture.md).
127
127
  steering brief to Pi's conversation history or main-agent context. BTW text
128
128
  reaches the main conversation only after the user copies, pastes, and submits it, and advisor
129
129
  results appear as normal tool results in the executor's transcript.
130
- - **Saved reviews**: Guided Review records, questions, drafts and captured Git source persist under the host's `getAgentDir()/bro-reviews/`. No automatic cleanup or sync is provided; see [storage and removal](../guided-review.md#access-privacy-and-storage).
130
+ - **Saved reviews**: Guided Review records, questions, drafts and captured Git source persist under the host's `getAgentDir()/bro-reviews/`. No automatic cleanup or sync is provided; see [storage and removal](../features/guided-review.md#access-privacy-and-storage).
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.
@@ -48,7 +48,7 @@ existing editing pages. The old `/bro doctor`, `/bro preferences` and
48
48
 
49
49
  Architecture Docs inherits the **BTW** backend/model/effort selection. It uses a fresh restricted file-inspection call and does not alter the BTW thread. See [Architecture Docs](../features/architecture.md).
50
50
 
51
- Elevate inherits the **BTW** backend/model/effort selection. There is no separate Elevate setting in this release. See the [Elevate guide](../elevate.md).
51
+ Elevate inherits the **BTW** backend/model/effort selection. There is no separate Elevate setting in this release. See the [Elevate guide](../features/elevate.md).
52
52
 
53
53
  Settings live in this user-editable file, created when the extension loads
54
54
  (under `$PI_CODING_AGENT_DIR` instead when that is set):
@@ -71,7 +71,7 @@ Settings live in this user-editable file, created when the extension loads
71
71
  }
72
72
  ```
73
73
 
74
- Bro reads the file again before each request, so manual edits apply next time.
74
+ Bro reads the file again before each request, so manual edits apply next time. If the file is missing, Bro saves the active physical Pi model as the default, with effort `default`. If Pi has no active model or is using a virtual model, Bro starts with the Agy preset shown above; use `/bro config` to choose another backend or a physical Pi model.
75
75
 
76
76
  - Each selection is one atomic backend/model/effort choice. An override pins
77
77
  its own complete selection and ignores the shared default, even when it
@@ -89,7 +89,7 @@ Bro reads the file again before each request, so manual edits apply next time.
89
89
  - `mode` is `brief`, `balanced` (the default), or `faithful`. `showTurns` is
90
90
  the default number of turns `/bro show` draws (default 1); `/bro show
91
91
  <n-turns>` overrides it for one run.
92
- - `PI_BRO_MODEL` picks the initial Agy model only when Bro creates a missing
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`.
94
94
  - Older flat settings files (root `model`/`effort`) still load and mean Agy.
95
95
 
@@ -161,7 +161,7 @@ another backend's authentication.
161
161
  `/bro doctor` applies the same explicit subscription checks as execution. A passing
162
162
  check establishes the tested login method and route, **not** a successful live
163
163
  answer, human account identity or subscription billing. See the
164
- [implementation notes](../DEVELOPMENT.md#official-cli-subscription-policy) for
164
+ [implementation notes](https://github.com/tranhoangnguyen03/pi-bro/blob/main/docs/DEVELOPMENT.md#official-cli-subscription-policy) for
165
165
  Codex's inspection-only catalog and the [PiG qualification guide](../piG-agent-shell-qualification.md#codex-provider-route-regression-and-diagnostic-parity)
166
166
  for the versioned real-CLI/local-server evidence.
167
167
 
@@ -219,4 +219,4 @@ read. Move what you want to keep into `/bro preferences`, and choose
219
219
 
220
220
  ## Remember Me
221
221
 
222
- `/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).
222
+ `/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](../features/remember-me.md).
@@ -42,7 +42,7 @@ tool before giving it to Bro.
42
42
  blocked, paginated, and media-first pages are not supported.
43
43
  - Direct webpage fetching does not currently use `HTTP_PROXY`, `HTTPS_PROXY`,
44
44
  or other proxy environment variables.
45
- - `/bro elevate` is pre-execution only. It does not validate expert claims, run source research or keep a persistent thread. Invalid discovery JSON can be retried with the [Retry] button; if it recurs, choose another BTW backend/model in `/bro config`. See [Elevate](../elevate.md).
45
+ - `/bro elevate` is pre-execution only. It does not validate expert claims, run source research or keep a persistent thread. Invalid discovery JSON can be retried with the [Retry] button; if it recurs, choose another BTW backend/model in `/bro config`. See [Elevate](../features/elevate.md).
46
46
  - `/bro btw` threads are saved in the Pi session file and restored on reload/restart. With the Pi backend, the native side session is memory-only, so the first turn after a restart reseeds it from the saved transcript and shows an expiry notice.
47
47
  - The Agy advisor requires Agy CLI `>=1.1.15`.
48
48
  - Show captures only the conversation text of what already happened in the
@@ -53,7 +53,7 @@ tool before giving it to Bro.
53
53
  headless session with no display reports the failure instead of opening
54
54
  anything.
55
55
  - Explain keeps only the latest result in memory and does not export directly to files. Guided Review separately persists review records and captured source.
56
- - Guided Review is local-Pi interactive only, keeps its captured revision on reopen, and does not publish, review a branch or fetch later PR changes. See [review recovery and limits](../guided-review.md#if-something-goes-wrong).
56
+ - Guided Review is local-Pi interactive only, keeps its captured revision on reopen, and does not publish, review a branch or fetch later PR changes. See [review recovery and limits](../features/guided-review.md#if-something-goes-wrong).
57
57
  - Bro temporarily captures mouse input while its modal is open so mouse-wheel
58
58
  and trackpad scrolling work in regular and fullscreen modes. Native mouse
59
59
  selection may be unavailable or visually extend outside the Bro window;
@@ -1,92 +1,23 @@
1
1
  # Remember Me
2
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.
3
+ This guide moved to [Remember Me](features/remember-me.md). The links below take you to the corresponding sections.
6
4
 
7
5
  ## Write through conversation
8
6
 
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.
7
+ [Write through conversation](features/remember-me.md#write-through-conversation)
19
8
 
20
9
  ## Controls
21
10
 
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
- During a draft or revision, the footer shows the current stage and elapsed seconds even if the model is quiet. It does not show the raw draft JSON, and progress is not saved as a memory. Elapsed time means the call remains pending, not that the model has made progress.
41
-
42
- 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.
11
+ [Controls](features/remember-me.md#controls)
43
12
 
44
13
  ## Agent access
45
14
 
46
- The main Pi agent gets a read-only `about_user` tool:
47
-
48
- ```text
49
- about_user() → short statements and IDs
50
- about_user({query:"testing"}) → matching summaries
51
- about_user({offset:20,limit:20}) → next page of memories
52
- about_user({expand:["m-..."]}) → approved background for an ID
53
- ```
54
-
55
- 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.
15
+ [Agent access](features/remember-me.md#agent-access)
56
16
 
57
17
  ## Boundaries
58
18
 
59
- 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.
60
-
61
- **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.
62
-
63
- 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:
64
-
65
- | Backend | Current restricted drafting behavior |
66
- | --- | --- |
67
- | Agy (default) | `--sandbox`, temporary working directory. Sandbox limits shell actions; it is **not** a no-tools or no-write guarantee. |
68
- | Codex | `--sandbox read-only`, ephemeral execution and temporary working directory; read-only sandbox, **not** no-tools. |
69
- | Claude | CLI tools disabled with `--tools ""`, strict empty MCP config, temporary working directory, no session persistence. |
70
- | Pi | Fresh SDK session with no tools, extensions, skills, or project context files, using the **selected configured physical model**. |
71
- | Muse | Write and shell disabled, approvals disabled, temporary working directory. Do not infer that all other abilities are disabled. |
72
- | Grok | A restricted **prompt request**, but CLI sandbox off and permissions bypassed; it is **not** a technical tool/write boundary. |
73
-
74
- 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.
75
-
76
- Live model behavior and the actual backend installation are separate from controlled-response tests.
77
-
78
- **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.
19
+ [Boundaries](features/remember-me.md#boundaries)
79
20
 
80
21
  ## Examples
81
22
 
82
- **Short:** `Testing: Seek sufficient confidence at the lowest reasonable maintenance cost; do not optimize for raw test count.`
83
-
84
- **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.
85
-
86
- **Short:** `Delegation: Allow agents to act independently within an approved coordination plan; reserve consequential scope changes for human approval.`
87
-
88
- **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.
89
-
90
- **Short:** `Answer length: Lead with a short answer; give enough detail for consequential design reviews. [Apparent tension: brevity versus depth depends on task.]`
91
-
92
- **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.
23
+ [Examples](features/remember-me.md#examples)
@@ -28,11 +28,11 @@ See [Explanation modes](features/explain.md#explanation-modes).
28
28
 
29
29
  ## Guided Review
30
30
 
31
- See [Guided Review](guided-review.md#guided-review).
31
+ See [Guided Review](features/guided-review.md#guided-review).
32
32
 
33
33
  ## Bro Elevate — improve a task before sending it
34
34
 
35
- See [Elevate: Discover → Select → Upgrade](elevate.md). Elevate does not execute a task or send it to the main agent. It helps find gaps, lets you approve suggestions, then offers a revised request. Elevate never edits your Pi draft; copy and paste the revision if you wish.
35
+ See [Elevate: Discover → Select → Upgrade](features/elevate.md). Elevate does not execute a task or send it to the main agent. It helps find gaps, lets you approve suggestions, then offers a revised request. Elevate never edits your Pi draft; copy and paste the revision if you wish.
36
36
 
37
37
  ## Bro btw (side conversation)
38
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-bro",
3
- "version": "0.37.0",
3
+ "version": "0.37.1",
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",
@@ -91,9 +91,10 @@
91
91
  "docs/user-guide.md",
92
92
  "docs/pig-compatibility.md",
93
93
  "docs/piG-agent-shell-qualification.md",
94
- "docs/guided-review.md",
94
+ "docs/feature-map.md",
95
95
  "docs/elevate.md",
96
96
  "docs/grill-me.md",
97
+ "docs/guided-review.md",
97
98
  "docs/overthink.md",
98
99
  "docs/remember-me.md",
99
100
  "docs/examples.md",
@@ -108,9 +109,9 @@
108
109
  "node": ">=22.19.0"
109
110
  },
110
111
  "scripts": {
111
- "docs:check": "node scripts/check-docs.mjs && node --test test/docs-quality.test.mjs",
112
+ "docs:check": "node scripts/check-docs.mjs",
112
113
  "typecheck": "tsc --noEmit",
113
- "test": "npm run typecheck && npm run docs:check && node .github/scripts/release-utils.mjs selftest && node --experimental-transform-types --test --test-concurrency=2 test/architecture.test.mjs test/architecture-review.test.mjs test/architecture-controller.test.mjs test/elevate.test.ts test/overthink.test.ts test/copy-modal.test.mjs test/simplify.test.ts test/simplify-modal.test.mjs test/session-state.test.ts test/session-lifecycle.test.mjs test/host-lifecycle.test.mjs test/grill.test.ts test/config-navigation.test.ts test/config-navigation-modal.test.mjs 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-session.test.mjs test/helpers.test.mjs test/prompt.test.ts test/backend.test.ts test/cli-auth.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/package-files.test.mjs 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",
114
+ "test": "npm run typecheck && npm run docs:check && node .github/scripts/release-utils.mjs selftest && node --experimental-transform-types --test --test-concurrency=2 \"test/**/*.test.{ts,mjs}\" \"benchmark/**/*.test.{ts,mjs}\" && sh ./test/smoke-test.sh",
114
115
  "benchmark:dry-run": "node benchmark/run.ts dry-run",
115
116
  "benchmark:run": "node benchmark/run.ts run",
116
117
  "benchmark:report": "node benchmark/run.ts report",
package/src/advisor.ts CHANGED
@@ -23,7 +23,7 @@ export const ADVISOR_TOOL_NAME = "bro_advisor";
23
23
  // setStatus() key for mirroring live advisor progress to the footer/status bar -- see the execute()
24
24
  // handler below for why this fallback surface exists alongside onUpdate's tool-card renderResult.
25
25
  export const ADVISOR_STATUS_BAR_KEY = "bro-advisor";
26
- export const ADVISOR_COMPATIBILITY = "Pi >=0.84.2; Agy >=1.1.15";
26
+ export const ADVISOR_COMPATIBILITY = "Pi >=1.3.0; Agy >=1.1.15";
27
27
  export const ADVISOR_STEERING_FILE = join(getAgentDir(), "bro-advisor.md");
28
28
  const MAX_ADVISOR_STEERING_FILE_BYTES = 64 * 1024;
29
29
 
package/src/backend.ts CHANGED
@@ -1516,6 +1516,7 @@ async function executeMuse(
1516
1516
  // pattern's thinking level, which createAgentSession cannot recover on its own, and
1517
1517
  // `isProjectTrusted` decides whether the workspace's `.pi/settings.json` may apply.
1518
1518
  export type PiHostContext = Pick<ExtensionContext, "modelRegistry" | "scopedModels"> & {
1519
+ model?: ExtensionContext["model"];
1519
1520
  isProjectTrusted?: () => boolean;
1520
1521
  };
1521
1522
 
package/src/bro.ts CHANGED
@@ -33,7 +33,6 @@ import { openGuidedReview, stopGuidedReviews } from "./review-ui.ts";
33
33
  import {
34
34
  type BroSettings,
35
35
  capabilityBackend,
36
- ensureSettingsFile,
37
36
  readPreferences,
38
37
  readSettings,
39
38
  writeSettings,
@@ -552,7 +551,4 @@ export default async function bro(pi: ExtensionAPI) {
552
551
  },
553
552
  });
554
553
  } catch { /* /bro still works; the command is the supported path to Elevate */ }
555
-
556
- // Keep the command available even when Bro cannot create its settings file; Doctor can then explain the problem.
557
- await ensureSettingsFile().catch(() => undefined);
558
554
  }
@@ -401,21 +401,21 @@ These are needs, not modes. Copied text does not enter Pi until you paste and su
401
401
  - \`/bro guided-review <PR number or URL>\` — assess captured PR code in local interactive Pi (requires Git and authenticated gh).
402
402
  - Reviews save automatically. Reopen without a model call; bare \`/bro guided-review\` lists saved reviews.\n- \`/bro guided-review delete [PR number or URL]\` — delete one local saved review with confirmation; Overview also offers Delete review.
403
403
  - Enter opens items or activates focused actions. Tab changes focus; Esc goes back, then closes from Contents. Close saves; Stop and close cancels active work first.
404
- - Copy finding goes to the clipboard, not GitHub. Regenerate reuses captured source. For untrusted PRs, choose file-only Claude/Muse/Pi; Codex/Grok offer sandboxed shell, while Agy may write captured files. Bro warns when shell is allowed. See docs/guided-review.md.
404
+ - Copy finding goes to the clipboard, not GitHub. Regenerate reuses captured source. For untrusted PRs, choose file-only Claude/Muse/Pi; Codex/Grok offer sandboxed shell, while Agy may write captured files. Bro warns when shell is allowed. See docs/features/guided-review.md.
405
405
 
406
406
  ## Elevate
407
407
 
408
408
  - \`/bro elevate [request]\` — improve a task before sending it. Ctrl+Shift+E uses the draft. Choose Messages/Full context; Space/Enter ticks findings; Tab focuses actions.
409
409
  - Enter adds a line; Ctrl+S or Ctrl+Enter discovers gaps. Use labelled buttons for actions.
410
- - Shares BTW settings; see docs/elevate.md.
410
+ - Shares BTW settings; see docs/features/elevate.md.
411
411
 
412
412
  ## Grill Me (experimental)
413
413
 
414
- - \`/bro grill-me [topic]\` — private decision interview. Use /consolidate, /copy or /help. Full-access risk: docs/grill-me.md.
414
+ - \`/bro grill-me [topic]\` — private decision interview. Use /consolidate, /copy or /help. Full-access risk: docs/features/grill-me.md.
415
415
 
416
416
  ## Overthink
417
417
 
418
- - \`/bro overthink\` — view private automatic second-look notes without a model call. Ctrl+R retries; Ctrl+E edits session questions; Ctrl+C copies. Uses the active Pi model. Turn off or edit defaults in \`/bro config\` → Features → Overthink. See docs/overthink.md.
418
+ - \`/bro overthink\` — view private second-look notes without a model call. Ctrl+R checks now; Ctrl+E edits session questions; Ctrl+C copies. Enable automatic checks in \`/bro config\` → Features → Overthink. See docs/features/overthink.md.
419
419
 
420
420
  ## Side conversation
421
421
 
@@ -121,13 +121,13 @@ export function globalQuestionsFile(dir = getAgentDir()): string {
121
121
  return join(dir, OVERTHINK_DEFAULTS_FILE);
122
122
  }
123
123
  export type OverthinkGlobal = { questions: string[]; automatic: boolean };
124
- /** Missing flag defaults to on, including files written before the on/off switch existed. */
124
+ /** Only an explicitly saved true enables automatic requests. */
125
125
  export async function readGlobalOverthink(dir = getAgentDir()): Promise<OverthinkGlobal> {
126
126
  const file = globalQuestionsFile(dir);
127
127
  let info;
128
128
  try { info = await lstat(file); }
129
129
  catch (error) {
130
- if ((error as NodeJS.ErrnoException).code === "ENOENT") return { questions: [...FACTORY_QUESTIONS], automatic: true };
130
+ if ((error as NodeJS.ErrnoException).code === "ENOENT") return { questions: [...FACTORY_QUESTIONS], automatic: false };
131
131
  throw error;
132
132
  }
133
133
  if (!info.isFile() || info.isSymbolicLink() || info.size > 32768) throw new Error("Unsafe or oversized Overthink defaults file: " + file);
@@ -136,7 +136,7 @@ export async function readGlobalOverthink(dir = getAgentDir()): Promise<Overthin
136
136
  (data.automatic !== undefined && typeof data.automatic !== "boolean")) {
137
137
  throw new Error("Unsupported Overthink defaults format: " + file);
138
138
  }
139
- return { questions: checkQuestions(data.questions), automatic: data.automatic ?? true };
139
+ return { questions: checkQuestions(data.questions), automatic: data.automatic ?? false };
140
140
  }
141
141
 
142
142
  export async function readGlobalQuestions(dir = getAgentDir()): Promise<string[]> {
package/src/overthink.ts CHANGED
@@ -133,7 +133,7 @@ export function createOverthinkViewer(
133
133
  };
134
134
  if (help) {
135
135
  [
136
- "Overthink checks settled substantial work using the same Pi model.",
136
+ "Overthink uses the active Pi model. Enable automatic checks in /bro config → Features → Overthink.",
137
137
  "It stays private and only notifies about consequential new concerns.",
138
138
  "",
139
139
  "Ctrl+R Retry with the current session",
@@ -154,7 +154,7 @@ export function createOverthinkViewer(
154
154
  if (busy) {
155
155
  add("Checking the current Pi session…");
156
156
  } else if (!note) {
157
- add("No assessment yet. Bro checks after substantial work; Ctrl+R checks now.");
157
+ add("No assessment yet. Ctrl+R checks now.");
158
158
  } else if (!note.text) {
159
159
  add("No material concerns found in the last check.");
160
160
  } else if (note.assessment) {
package/src/settings.ts CHANGED
@@ -6,10 +6,12 @@ import {
6
6
  type BackendSelection,
7
7
  agySelection,
8
8
  CLAUDE_EFFORTS,
9
+ getPiHostContext,
9
10
  GROK_EFFORTS,
10
11
  CODEX_EFFORTS,
11
12
  MUSE_EFFORTS,
12
13
  PI_EFFORTS,
14
+ piPhysicalModel,
13
15
  } from "./backend.ts";
14
16
  import { type BroMode, DEFAULT_BRO_MODE, MAX_PREFERENCES_CHARS, parseBroMode } from "./prompt.ts";
15
17
  import { errorMessage, isRecord } from "./util.ts";
@@ -507,10 +509,16 @@ export async function ensureSettingsFile(): Promise<void> {
507
509
  await mkdir(getAgentDir(), { recursive: true });
508
510
  try {
509
511
  const envModel = process.env.PI_BRO_MODEL?.trim();
510
- const defaultModel = envModel || "gemini-3.7-flash";
512
+ const host = getPiHostContext();
513
+ const active = host?.model;
514
+ // PiG can report a placeholder when no model is configured; only bootstrap from a catalog model.
515
+ const pair: ModelEffortPair = envModel
516
+ ? { model: envModel, effort: "default" }
517
+ : active && piPhysicalModel(host?.modelRegistry, active.provider, active.id)
518
+ ? { backend: "pi", model: piModelValue(active.provider, active.id), effort: "default" }
519
+ : { model: "gemini-3.7-flash", effort: "low" };
511
520
  const initial: BroSettings = {
512
- model: defaultModel,
513
- effort: envModel ? "default" : "low",
521
+ ...pair,
514
522
  mode: DEFAULT_BRO_MODE,
515
523
  showTurns: DEFAULT_SHOW_TURNS,
516
524
  overrides: {},