@geoqiao/pi-ask 1.3.0 → 1.3.2

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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## 1.3.2
2
+
3
+ ### Patch Changes
4
+
5
+ - 058a2d4: Streamline the package READMEs with quick starts, common commands, and capability tables. Link pi-ask configuration to its existing source-of-truth guide, fold detailed screenshots, and preserve context-first clarification and TUI/RPC boundaries. Clarify paseo-btw prerequisites, native-versus-Skill invocation, context inheritance, and safety limitations without changing runtime behavior.
6
+
7
+ ## 1.3.1
8
+
9
+ ### Patch Changes
10
+
11
+ - 1e56b27: Ask only when context review leaves a critical requirement, outcome-changing preference, or high-impact authorization gap unresolved, or when the user explicitly requests interactive questions. Align tool prompts, the bundled skill, and docs so alternatives, ordinary comparisons, and already authorized work do not automatically trigger interviews. Preserve safety and payload/TUI/RPC constraints; add static prompt regression checks and document model-evaluation scenarios without claiming verified model behavior.
12
+
1
13
  ## 1.3.0
2
14
 
3
15
  ### Minor Changes
package/README.md CHANGED
@@ -1,312 +1,166 @@
1
- ![pi-ask main image](docs/media/pi-ask-main.png)
2
-
3
- # @geoqiao/pi-ask
1
+ # Pi Ask
4
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@geoqiao/pi-ask)](https://www.npmjs.com/package/@geoqiao/pi-ask)
5
4
  [![npm downloads](https://badgen.net/npm/dm/@geoqiao/pi-ask)](https://www.npmjs.com/package/@geoqiao/pi-ask)
6
5
  [![CI](https://github.com/geoqiao/pi-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/geoqiao/pi-tools/actions/workflows/ci.yml)
7
- [![last commit](https://badgen.net/github/last-commit/geoqiao/pi-tools)](https://github.com/geoqiao/pi-tools/commits/main)
8
- [![stars](https://badgen.net/github/stars/geoqiao/pi-tools)](https://github.com/geoqiao/pi-tools/stargazers)
9
-
10
- > [!IMPORTANT]
11
- > This is an independently maintained continuation of [`eko24ive/pi-ask`](https://github.com/eko24ive/pi-ask), with portable Pi RPC mode support while preserving the rich TUI experience.
12
-
13
- `@geoqiao/pi-ask` is an ask tool that cares about your answers.
14
6
 
15
- It lets an agent pause, ask structured questions in a terminal UI or portable Pi RPC dialogs, and continue with normalized answers instead of guessing.
7
+ **Answer your agent's questions without losing the thread.**
16
8
 
17
- ![pi-ask demo](docs/media/pi-ask-demo.gif)
9
+ `@geoqiao/pi-ask` adds structured clarification to [Pi](https://pi.dev): choose options, type your own answer, or ask for an explanation before deciding. Get a rich terminal form in TUI mode and portable sequential dialogs in RPC mode, with normalized answers returned to the agent.
18
10
 
19
- High-quality video: [demo.mp4](https://github.com/user-attachments/assets/a8503ca9-afcb-4c31-9edc-353b985a0209)
11
+ ![Pi Ask: structured questions, custom answers, and review](docs/media/pi-ask-demo.gif)
20
12
 
21
- ## Upstream and contributions
13
+ [Watch the high-quality demo](https://github.com/user-attachments/assets/a8503ca9-afcb-4c31-9edc-353b985a0209)
22
14
 
23
- This project preserves the upstream Git history, MIT license, and author attribution. New
24
- development and releases are maintained independently in the
25
- [`geoqiao/pi-tools`](https://github.com/geoqiao/pi-tools/tree/main/packages/pi-ask) monorepo. Issues
26
- and contributions are welcome there.
15
+ [Quick start](#quick-start) · [Everyday use](#everyday-use) · [TUI and RPC](#tui-and-rpc) · [Settings](#settings) · [Documentation](#documentation)
27
16
 
28
- ## Install
17
+ ## Quick start
29
18
 
30
19
  ```bash
31
20
  pi install npm:@geoqiao/pi-ask
32
21
  ```
33
22
 
34
- Or try it without installing (load once for the current run):
23
+ Run `/reload` in an already-open Pi session. The agent can then call `ask_user` when clarification is needed; you can also explicitly ask it to interview you.
24
+
25
+ To try the package for one run without adding it to your saved package configuration:
35
26
 
36
27
  ```bash
37
28
  pi -e npm:@geoqiao/pi-ask
38
29
  ```
39
30
 
40
- ## Features
41
-
42
- Once installed, this package gives the agent a native way to ask for clarification instead of guessing. The rich interface is used in TUI mode.
43
-
44
- - 🧭 Familiar ask-style interface: tabbed questions, single/multi select, and preview mode
45
- - ⭐ Optional warning-colored `(recommended)` markers that do not preselect answers
46
- - ✍️ Inline free-form `Type your own` answers
47
- - 📎 Native pi-style `@` file references inside answer and note editors
48
- - 📝 Question-level and option-level notes
49
- - 👀 Review tab with `Submit`, `Elaborate`, and `Cancel`
50
- - 💬 Elaboration flow to capture note-based clarification before final submission
51
- - 🔌 Pi RPC fallback using portable sequential dialogs with normalized results
52
- - ⌨️ Context-aware customizable keymaps with aliases for main flow, editors, and settings
53
- - ⚙️ Ask settings with persisted behaviour, notifications, keymaps, and `/answer` extraction config
54
- - 🔔 Optional external notifications when an ask flow is waiting for input
55
- - 🔁 Slash commands for fallback/replay:
56
- - `/answer` extracts questions from the latest assistant message into an ask flow
57
- - `/answer:again` reopens the latest `/answer` form on the current branch
58
- - `/ask:replay` replays the latest real `ask_user` form on the current branch
59
- - 🛟 Automatic recovery of an unanswered `ask_user` form after startup, resume, or fork
60
- - 🗣️ You can talk to your agent to configure pi-ask; it will read the bundled configuration guide and tailor the config for you
31
+ If the agent has already asked questions in plain text, run `/answer` in TUI mode to turn its latest completed message into a form.
61
32
 
62
- ## Feature walkthrough
33
+ > Independently maintained continuation of [eko24ive/pi-ask](https://github.com/eko24ive/pi-ask), preserving the upstream history, MIT license, and attribution while adding portable Pi RPC support.
63
34
 
64
- ### Native `@` file references
65
- Use pi-style `@` file path autocomplete inside free-form answers and note editors.
35
+ ## Everyday use
66
36
 
67
- ![Native pi-style @ file references inside the ask flow](docs/media/feature-at-file-mentions.png)
68
-
69
- ### Option and question notes
70
- Attach clarification notes to a specific option (`n`) or add broader question-level context (`Shift+N`).
71
-
72
- | Option notes | Question notes |
73
- |---|---|
74
- | ![Option note editor with note text for selected option](docs/media/feature-option-note.png) | ![Question-level note editor with saved note](docs/media/feature-question-note.png) |
75
-
76
- ### Review tab — Elaborate and Submit
77
- Ask the agent to elaborate on notes before finalizing choices, or review all answers before returning them to the agent.
78
-
79
- | Elaborate | Submit |
37
+ | Need | Feature |
80
38
  |---|---|
81
- | ![Review tab with Elaborate action and expanded note preview](docs/media/feature-review-elaborate.png) | ![Review tab with Submit action highlighted](docs/media/feature-review-submit.png) |
39
+ | Choose one answer or several | Single-select, multi-select, and preview questions |
40
+ | Give an answer outside the options | Inline `Type your own`, with native Pi-style `@` file references |
41
+ | Understand a choice before deciding | Notes on a question or option, followed by `Elaborate` |
42
+ | Review before continuing | `Submit`, `Elaborate`, and `Cancel` review actions in TUI |
43
+ | See the agent's recommendation | Optional `(recommended)` markers with reasons; never preselected |
44
+ | Recover a previous form | Replay commands and automatic recovery of interrupted TUI asks |
82
45
 
83
- ### Single-select and multi-select questions
84
- Pick one option when answers are mutually exclusive, or choose multiple options when several answers apply.
46
+ ### Commands
85
47
 
86
- | Single-select | Multi-select |
48
+ | Command | What it does |
87
49
  |---|---|
88
- | ![Single-select question with one selected option](docs/media/feature-single-select.png) | ![Multi-select question with multiple selected options](docs/media/feature-multi-select.png) |
89
-
90
- ### Preview mode
91
- Use a dedicated preview pane when options need richer detail.
50
+ | `/answer` | Extracts questions from the latest completed assistant message and opens an ask form |
51
+ | `/answer:again` | Reopens the latest `/answer` form on the current branch |
52
+ | `/ask:replay` | Reopens the latest real `ask_user` form on the current branch |
53
+ | `/ask-settings` | Opens the settings overlay; `?` inside a form opens the same overlay |
92
54
 
93
- ![Preview question showing a dedicated preview pane](docs/media/feature-preview-pane.png)
55
+ These commands are TUI-only. Replay is branch-aware and works with `/resume` and `/tree`. Closing a command-opened form does not start an agent turn; submitting or elaborating sends a normal user follow-up.
94
56
 
95
- ### Custom answer (`Type your own`)
96
- Capture free-form input inline without leaving the flow.
57
+ `/answer` uses a configured extraction model and the preceding user message as context. It validates the extracted form and retries missing or invalid output. Normal `ask_user` calls do not use this extraction model. See [extraction settings](docs/configuration.md#answer-extraction).
97
58
 
98
- ![Inline custom answer input for Type your own option](docs/media/feature-custom-answer-input.png)
59
+ ### When the agent asks
99
60
 
100
- ## Default key bindings
61
+ The agent should read available code, docs, conversation, and prior answers first. It asks only for unresolved critical requirements, outcome-changing preferences, or consequential/hard-to-reverse actions beyond existing authorization. Explicitly requested interviews, requirements gathering, and interactive questions also use `ask_user`.
101
62
 
102
- Open ask settings with `?` during the ask flow, or with the `/ask-settings` command from pi.
63
+ Clear small changes, settled choices, authorized reversible steps, and routine implementation details proceed without reconfirmation. Multiple options or architecture/naming/research labels alone do not trigger questions; clear comparison/research requests get analysis first. Follow-ups address only current blockers, and settled decisions reopen only for materially new information.
103
64
 
104
- Keymaps are context-aware and configurable in `~/.pi/agent/extensions/eko24ive-pi-ask.json`. The established filename is retained so users can switch from the upstream package without losing settings.
105
- Each action accepts a key string or an array of aliases.
65
+ Delegated autonomy does not waive safety boundaries. Cancellation, skipped questions, and unclear answers are not high-risk approval. This is prompt guidance, **not a runtime permission check or a guarantee of model behavior**. See the [policy and verification limits](docs/contract.md#skill-alignment-advisory) and [skill examples](skills/ask-user/SKILL.md#examples-and-behavioral-evaluation-cases).
106
66
 
107
- Default contexts:
67
+ ## TUI and RPC
108
68
 
109
- - `global`: `dismiss` (`Ctrl+C`) and `settings` (`?`)
110
- - `main`: confirm/cancel/toggle, tab navigation, option navigation, and note shortcuts
111
- - `editor`: custom answer submit/close and empty-editor navigation
112
- - `noteEditor`: note save/close and empty-editor navigation
113
- - `settingsModal`: close, next/previous setting, and toggle
69
+ Both modes return normalized answers, but their interfaces differ:
114
70
 
115
- Fixed bindings:
116
-
117
- | Key | Context | Effect |
71
+ | Capability | TUI | RPC with portable UI support |
118
72
  |---|---|---|
119
- | `1..9` | Options list | Select or toggle matching option |
120
- | `1` `2` `3` | Review tab | Trigger `Submit` / `Elaborate` / `Cancel` |
121
- | `@` | Editors | File-reference affordance |
122
- | Arrow keys / `Tab` | Non-empty editor | Stay in editor for cursor movement |
123
-
124
- Review-tab shortcuts can optionally require the same number key twice via `behaviour.doublePressReviewShortcuts`. `behaviour.presentSingleAsMulti` can render future single-select questions as multi-select while preserving the requested type in results; use `main.changeQuestionType` (`t` by default) to change the active question type live.
125
-
126
- You can edit the config file yourself, ask pi to edit it for you, or use `/ask-settings` to find the exact config path, toggle behaviour/notification settings, or reset config to defaults with a guarded double press. pi-ask treats the config file as user-owned: load-time migrations and invalid files are handled in memory without rewriting or backing up the file, and read-only/externally managed configs fail gracefully with a manual-edit message.
127
-
128
- ```json
129
- {
130
- "schemaVersion": 5,
131
- "answer": {
132
- "extractionModels": [
133
- { "provider": "openai-codex", "id": "gpt-5.4-mini" },
134
- { "provider": "github-copilot", "id": "gpt-5.4-mini" },
135
- { "provider": "anthropic", "id": "claude-haiku-4-5" }
136
- ],
137
- "extractionTimeoutMs": 30000,
138
- "extractionRetries": 1
139
- },
140
- "behaviour": {
141
- "autoSubmitWhenAnsweredWithoutNotes": false,
142
- "confirmDismissWhenDirty": true,
143
- "doublePressReviewShortcuts": true,
144
- "presentSingleAsMulti": false,
145
- "showFooterHints": true
146
- },
147
- "keymaps": {
148
- "global": { "dismiss": ["ctrl+c"], "settings": ["?"] },
149
- "main": {
150
- "confirm": ["enter"],
151
- "cancel": ["esc"],
152
- "toggle": ["space"],
153
- "changeQuestionType": ["t"],
154
- "nextTab": ["tab", "right"],
155
- "previousTab": ["shift+tab", "left"],
156
- "nextOption": ["down"],
157
- "previousOption": ["up"],
158
- "optionNote": ["n"],
159
- "questionNote": ["shift+n"]
160
- },
161
- "editor": {
162
- "submit": ["enter"],
163
- "close": ["esc"],
164
- "nextTabWhenEmpty": ["tab", "right"],
165
- "previousTabWhenEmpty": ["shift+tab", "left"],
166
- "nextOptionWhenEmpty": ["down"],
167
- "previousOptionWhenEmpty": ["up"]
168
- },
169
- "noteEditor": {
170
- "save": ["enter"],
171
- "close": ["esc"],
172
- "nextTabWhenEmpty": ["tab", "right"],
173
- "previousTabWhenEmpty": ["shift+tab", "left"],
174
- "nextOptionWhenEmpty": ["down"],
175
- "previousOptionWhenEmpty": ["up"]
176
- },
177
- "settingsModal": {
178
- "close": ["esc", "ctrl+c", "?"],
179
- "nextOption": ["down"],
180
- "previousOption": ["up"],
181
- "toggle": ["enter", "space"]
182
- }
183
- },
184
- "notifications": {
185
- "enabled": true,
186
- "channels": ["bell"]
187
- }
188
- }
189
- ```
190
-
191
- Accepted notation follows pi-tui key ids. Common aliases are normalized, for example `escape` → `esc`, `return` → `enter`, `control+c` → `ctrl+c`, and `Shift+N` → `shift+n`.
192
-
193
- ## Use
194
-
195
- After installation, the extension registers the `ask_user` tool plus `/ask-settings`, `/answer`, `/answer:again`, and `/ask:replay` commands.
196
-
197
- Agents can auto-discover and call `ask_user` when they need clarification instead of guessing. They can mark any number of grounded preferences with `recommended: true` and use option descriptions for reasons. In interactive sessions, it opens a terminal UI flow for structured answers, supports native pi-style `@` file references while typing answers or notes, and returns normalized answers back to the agent. Ask settings are available both from `?` in the ask flow and from the `/ask-settings` command. Behaviour and notification settings are binary `on`/`off` toggles that save immediately when the config file is writable; save failures revert the toggle and show a manual-edit message. The settings overlay includes a guarded double-press reset-to-defaults action; keymaps, notification channels, and extraction settings are changed by editing the shown config file path.
198
-
199
- ### Pi RPC fallback
200
-
201
- When Pi runs in RPC mode with portable extension UI support, `ask_user` keeps the same normalized result contract but uses sequential dialogs:
202
-
203
- - each question card contains only its real options plus `Type something…`
204
- - selecting a real option and submitting advances directly to the next question or completes the flow
205
- - `Type something…` opens one `input` dialog; on multi questions it is the fallback for entering multiple choices
206
- - dismissing a question or its input skips that question instead of cancelling the flow
207
- - recommendation markers, descriptions, and preview content are flattened into readable option strings without changing canonical values or labels
208
- - multiple questions include `[current/total]` progress in each dialog title
209
- - tool abort signals close portable `select`/`input` dialogs and return `cancelled: true`
210
-
211
- RPC intentionally does not reproduce the tabbed same-screen form, native checkbox cards, repeated multi-select cards, notes, Skip/Cancel option rows, custom preview pane, question-type hotkeys, settings overlay, or final Submit/Elaborate review tab. The fallback completes in `submit` mode after the sequential questions. `/answer`, `/answer:again`, `/ask:replay`, and `/ask-settings` remain TUI-only.
212
-
213
- ### Answer and replay commands
73
+ | Layout | Tabbed, same-screen form | Sequential dialogs with `[current/total]` progress |
74
+ | Answers | Native single/multi selection and custom text | One real option or `Type something…`; type multiple choices as free-form text |
75
+ | Previews and recommendations | Preview pane and recommendation subtitles | Details flattened into option text; canonical labels and values stay unchanged |
76
+ | Notes and review | Question/option notes and final review tab | No notes or final review; submitting an option advances directly |
77
+ | Settings and replay commands | Supported | TUI-only |
78
+ | Dismissal | Flow-level cancel/dismiss, with optional dirty-state confirmation | Dismissing a card or input skips that question; tool abort cancels the flow |
214
79
 
215
- `/answer` is useful when the agent asked questions in plain text instead of using `ask_user`. It supplies the preceding user message as context, asks the configured extraction model for one synthetic `ask_user` tool call, validates the result, and opens the same ask UI. Missing or invalid tool calls are retried; raw and fenced JSON text remain supported as fallbacks.
80
+ RPC does not emulate checkbox cards, repeated multi-select dialogs, or custom preview panes. Unanswered questions remain unanswered, including those marked `required`: that field is advisory, not submission enforcement.
216
81
 
217
- Replay commands are branch-aware. They read persisted entries from the current pi session branch, so they work naturally with `/resume`, `/tree`, and conversation branching:
82
+ Print, JSON, and RPC without portable UI cannot open a form. They return a needs-user-input message with pending questions rather than pretending to collect answers.
218
83
 
219
- - `/answer:again` reopens the latest form created by `/answer` on this branch
220
- - `/ask:replay` reopens the latest real `ask_user` form on this branch
84
+ ### Interrupted forms
221
85
 
222
- Cancellation is local to the UI: closing a replayed form does not start a new agent turn. Submitted answers are sent back as a normal user follow-up message.
86
+ Starting, resuming, or forking a TUI session recovers its newest unresolved `ask_user` form once. Submission is delivered as a user message because the original tool execution no longer exists. Submit or cancel prevents another automatic reopen; `/ask:replay` remains available.
223
87
 
224
- ### Interrupted ask forms
88
+ New sessions, extension reloads, non-TUI modes, and RPC do not trigger recovery.
225
89
 
226
- If Pi stops while an `ask_user` form is open, the tool call remains without a result. Starting, resuming, or forking that session reopens the newest unanswered form once. Submitting sends the result as a user message because the original tool execution no longer exists. Cancelling dismisses the automatic recovery. Either outcome prevents another automatic reopen, while `/ask:replay` remains available.
90
+ ## Settings
227
91
 
228
- New sessions, extension reloads, non-TUI modes, and RPC sessions do not trigger recovery.
92
+ Open `/ask-settings`, or press `?` inside the TUI form. You can adjust auto-submit, dirty-dismiss confirmation, review shortcut confirmation, single-as-multi presentation, footer hints, and notifications. Resetting defaults requires a guarded double press.
229
93
 
230
- Kudos to [@k0valik](https://github.com/k0valik) for the `/answer` idea.
94
+ Settings save when the file is writable; failed saves revert the change and show a manual-edit message. Invalid files and load-time migrations do not rewrite user-owned configuration. The established upstream-compatible path remains:
231
95
 
232
- You can also talk to pi to configure this extension. When asked to customize pi-ask settings, keymaps, notifications, or extraction behavior, the agent is instructed to read the bundled `docs/configuration.md` guide first and then edit the config file accordingly.
233
-
234
- This package also bundles the `ask-user` skill profile from `skills/ask-user/SKILL.md`. It reinforces when to use the tool, is enabled by default when installed, and can be disabled via `pi config`. The skill was inspired by https://github.com/edlsh/pi-ask-user.
235
-
236
- You can still add your own agent instruction if you want to further reinforce usage.
237
-
238
- For exact input/output and UX guarantees, see [`docs/contract.md`](docs/contract.md).
239
-
240
- ## Local development
241
-
242
- ### Run locally in pi
243
-
244
- ```bash
245
- pi -e ./src/index.ts
96
+ ```text
97
+ ~/.pi/agent/extensions/eko24ive-pi-ask.json
246
98
  ```
247
99
 
248
- ### Run in isolated test mode (extension + bundled skill only)
100
+ For the complete config shape, defaults, keymap rules, notification channels, and extraction settings, use **[docs/configuration.md](docs/configuration.md)** rather than copying a second config example from this README. You can also ask your agent to configure pi-ask; it is instructed to read that guide first.
249
101
 
250
- ```bash
251
- pnpm dev
252
- pnpm dev ../test
253
- ```
102
+ ### Handy default keys
254
103
 
255
- `pnpm dev [path]` runs pi with `--no-extensions --no-skills --no-prompt-templates --no-themes --no-context-files`, loads this repo’s extension and `skills/ask-user`, and starts pi from `[path]` by changing directories before launch (defaults to `.`).
104
+ | Key | Context | Action |
105
+ |---|---|---|
106
+ | `Tab` / `Shift+Tab` | Main flow | Next / previous question tab |
107
+ | `↑` / `↓` | Main flow | Move between options |
108
+ | `Enter` / `Space` | Main flow | Confirm / toggle |
109
+ | `1..9` | Options | Select or toggle by number |
110
+ | `n` / `Shift+N` | Main flow | Add an option / question note |
111
+ | `t` | Main flow | Change the current question type |
112
+ | `?` | Form | Open settings |
113
+ | `@` | Answer and note editors | Complete a file reference |
256
114
 
257
- ### Install dependencies
115
+ In non-empty editors, arrows and `Tab` stay with the text. On the review tab, `1`, `2`, and `3` mean Submit, Elaborate, and Cancel; by default, each needs a second press. Destructive multi-to-single changes also require confirmation. The single-as-multi setting applies to new/replayed forms; `t` changes the active question. See [keymaps](docs/configuration.md#keymaps) for customization and the [contract](docs/contract.md#keyboard-behavior) for exact editing and cancellation behavior.
258
116
 
259
- ```bash
260
- pnpm install
261
- ```
117
+ <details>
118
+ <summary>Feature screenshots</summary>
262
119
 
263
- ### Install git hooks (contributors)
264
-
265
- `lefthook` is not installed automatically. If you want the local commit hooks used by this repo, run:
120
+ | Feature | Preview |
121
+ |---|---|
122
+ | File references in answers and notes | ![Native @ file autocomplete](docs/media/feature-at-file-mentions.png) |
123
+ | Option and question notes | ![Option note](docs/media/feature-option-note.png) ![Question note](docs/media/feature-question-note.png) |
124
+ | Elaborate and Submit review | ![Elaborate review](docs/media/feature-review-elaborate.png) ![Submit review](docs/media/feature-review-submit.png) |
125
+ | Single and multi selection | ![Single selection](docs/media/feature-single-select.png) ![Multi selection](docs/media/feature-multi-select.png) |
126
+ | Rich option previews | ![Preview pane](docs/media/feature-preview-pane.png) |
127
+ | A custom answer | ![Type your own answer](docs/media/feature-custom-answer-input.png) |
266
128
 
267
- ```bash
268
- pnpm exec lefthook install
269
- ```
129
+ </details>
270
130
 
271
- ### Development commands
131
+ ## Documentation
272
132
 
273
- ```bash
274
- pnpm format
275
- pnpm lint
276
- pnpm check
277
- pnpm typecheck
278
- pnpm test
279
- ```
133
+ | Guide | Contents |
134
+ |---|---|
135
+ | [Configuration](docs/configuration.md) | Settings, keymaps, notifications, and `/answer` extraction |
136
+ | [Contract](docs/contract.md) | Input/output, TUI/RPC behavior, replay, and recovery guarantees |
137
+ | [Architecture](docs/architecture.md) | Module responsibilities and invariants |
138
+ | [Remote events](docs/remote-events.md) | Trusted local inter-extension integration |
139
+ | [Ask User skill](skills/ask-user/SKILL.md) | Context-first clarification policy and behavioral evaluation cases |
280
140
 
281
- ### Commit workflow
141
+ The bundled skill is enabled by default when installed and can be disabled through `pi config`. Tool guidance remains available without it.
282
142
 
283
- This monorepo uses `lefthook`, Commitizen, conventional commitlint, and Changesets.
143
+ ## Development
284
144
 
285
- If you want local hooks, install them once after `pnpm install`:
145
+ From the monorepo root:
286
146
 
287
147
  ```bash
288
- pnpm exec lefthook install
148
+ pnpm --filter @geoqiao/pi-ask dev
149
+ pnpm --filter @geoqiao/pi-ask dev /absolute/path/to/project
289
150
  ```
290
151
 
291
- From the repository root, the recommended flow is:
152
+ The dev script isolates this extension and its bundled skill using `--no-extensions --no-skills --no-prompt-templates --no-themes --no-context-files`, then changes to the target directory before launching Pi. To load just the extension manually, run `pi -e ./src/index.ts` from this package directory.
292
153
 
293
154
  ```bash
294
- pnpm commit
155
+ pnpm --filter @geoqiao/pi-ask typecheck
156
+ pnpm --filter @geoqiao/pi-ask test
157
+ pnpm --filter @geoqiao/pi-ask pack:check
295
158
  ```
296
159
 
297
- User-facing changes should also include a Changeset created with `pnpm changeset`.
298
-
299
- ## Project layout
160
+ See [CONTRIBUTING.md](../../CONTRIBUTING.md) for workspace setup, formatting, conventional commits, and Changesets. Local hooks are optional and are not installed automatically; run `pnpm exec lefthook install` at the workspace root if wanted. Keep README media in `docs/media/`; these assets are repository-only.
300
161
 
301
- - `src/` TypeScript extension implementation
302
- - `tests/` — behavior-focused tests
303
- - `docs/` — small docs set for contract and architecture
304
- - `docs/media/` — repository-only README media assets
305
-
306
- ## Documentation
162
+ ## Attribution and contributions
307
163
 
308
- Docs stay intentionally small:
164
+ [MIT](LICENSE). This independently maintained continuation preserves [eko24ive/pi-ask](https://github.com/eko24ive/pi-ask)'s history and attribution. Development and issues live in [geoqiao/pi-tools](https://github.com/geoqiao/pi-tools).
309
165
 
310
- - `docs/README.md` index
311
- - `docs/contract.md` — external behavior
312
- - `docs/architecture.md` — module boundaries and invariants
166
+ Thanks to [@k0valik](https://github.com/k0valik) for the `/answer` idea. The bundled skill was inspired by [edlsh/pi-ask-user](https://github.com/edlsh/pi-ask-user).
package/docs/README.md CHANGED
@@ -8,7 +8,7 @@ This folder keeps only the documentation needed to understand and maintain the e
8
8
  - `contract.md` — external behavior, tool payload/result details, and UX guarantees
9
9
  - `remote-events.md` — local inter-extension event contract, bridge examples, and smoke-test steps
10
10
  - `architecture.md` — module boundaries and invariants
11
- - `../skills/ask-user/SKILL.md` — auto-bundled agent-side decision-gate guidance; enabled by default, but can be disabled via `pi config`; inspired by https://github.com/edlsh/pi-ask-user
11
+ - `../skills/ask-user/SKILL.md` — context-first clarification policy and behavioral evaluation cases (not model test results); enabled by default, but can be disabled via `pi config`; inspired by https://github.com/edlsh/pi-ask-user
12
12
 
13
13
  ## Reading order
14
14
 
package/docs/contract.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ask tool contract
2
2
 
3
- `ask_user` is a pi-native clarification tool for cases where implementation depends on user preference or missing requirements.
3
+ `ask_user` is a pi-native clarification tool for material requirement, preference, or high-impact authorization gaps left after context review, and for explicitly requested interviews.
4
4
 
5
5
  This document defines the stable external behavior. It does not explain internal helper-by-helper implementation.
6
6
 
@@ -196,8 +196,8 @@ This document defines the stable external behavior. It does not explain internal
196
196
  - option-targeted elaboration items include the specific noted option plus whether it is currently selected
197
197
  - question-targeted elaboration items include whether the question already has a committed answer
198
198
  - `elaboration.instruction` tells the agent to answer the clarification directly first, then re-ask only the affected questions if a choice is still needed
199
- - after clarification, agents should prefer another structured follow-up over plain-text multiple choice when a decision is still unresolved
200
- - once prior answers narrow the branch, agents should bundle the next 2-3 related unresolved questions into one follow-up ask when possible, instead of using a long sequence of single-question asks
199
+ - after clarification, agents should use a structured follow-up rather than plain-text multiple choice only when a material decision still blocks progress
200
+ - follow-ups should preserve settled answers and ask only current blockers; related blockers may be bundled when they do not depend on each other's answers, without filling a question quota
201
201
  - `elaboration` is only present when `mode === "elaborate"`
202
202
  - elaborate `content` text and transcript rendering describe each note directly using the full question prompt and option label, and include the current committed answer text when available, instead of a generic elaboration banner
203
203
  - when the user selects `Elaborate` without adding notes, elaborate `content` text and transcript rendering still include the committed answer text so the agent can elaborate on that answer directly
@@ -332,9 +332,15 @@ The non-interactive fallback message includes normalized pending questions and o
332
332
 
333
333
  ## Skill alignment (advisory)
334
334
 
335
- The auto-bundled skill profile at `skills/ask-user/SKILL.md` defines agent-side decision-gate guidance for when to call `ask_user`. It is enabled by default when the package is installed, but can be disabled via `pi config`.
335
+ The tool description, `promptSnippet`, `promptGuidelines`, and auto-bundled [`ask-user` skill](../skills/ask-user/SKILL.md) share the same context-first policy. The skill is enabled by default when installed and can be disabled via `pi config`; the tool guidance does not depend on loading it.
336
336
 
337
- It is advisory only. If there is any conflict, contract + tests win.
337
+ Read available code, docs, conversation, prior answers, and existing authorization before asking. Use `ask_user` only for a critical requirement still missing/conflicting, an unresolved preference that materially changes the outcome, or missing authorization for a consequential or hard-to-reverse action beyond the approved scope. Explicit requests for interviews, requirements gathering, or interactive questions also use `ask_user`; a requested written questionnaire remains a prose artifact.
338
+
339
+ Do not ask about matters already resolved by context or reconfirm settled choices/authorization. Proceed with reversible steps and ordinary implementation details within scope, stating useful assumptions. Multiple viable options and labels such as architecture, naming, or research alone do not justify asking. Complete clear comparison/research requests first rather than automatically starting an interview. Ask only current blockers (or the current requested interview topic), and reopen settled decisions only for materially new information.
340
+
341
+ Delegated autonomy does not waive safety boundaries. Cancellation, missing answers, or ambiguous responses are not high-risk approval; leave unauthorized actions blocked. Neither `cancelled: false` nor advisory `required` metadata establishes approval.
342
+
343
+ This policy is advisory, not runtime authorization enforcement; contract + tests take precedence for tool behavior. `tests/ask-tool.test.ts` checks the actual registered prompt fields, retained payload/RPC guidance, and removal of old blanket triggers. These are static string checks, not proof of model behavior. The skill records behavioral evaluation cases, including small edits, approved plans, missing requirements, unauthorized high-risk actions, explicit interviews, and ordinary comparisons. Actual evaluation requires model sessions and inspection of context reads, questions, and subsequent actions, with and without the skill; record false positives/negatives separately from static test results.
338
344
 
339
345
  ## Source of truth
340
346
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoqiao/pi-ask",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Pi package that adds an interactive ask_user clarification tool.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,112 +1,70 @@
1
1
  ---
2
2
  name: ask-user
3
- description: "Use ask_user as a decision, research, and requirements gate before ambiguous or high-stakes choices."
3
+ description: "Use ask_user when context review leaves a critical requirement, outcome-changing preference, or high-impact authorization gap unresolved, or the user explicitly requests an interview, requirements gathering, or interactive questions. Not for multiple options or comparison/research requests alone."
4
4
  metadata:
5
- short-description: Decision, research, and requirements gate
5
+ short-description: Clarify material gaps after reading context
6
6
  ---
7
7
 
8
- # Ask User decision/research gate
8
+ # Ask User: clarify material gaps
9
9
 
10
- Use this skill to force explicit user alignment before consequential decisions, preference-sensitive planning, research scoping, or requirements gathering.
10
+ Read available context before asking. Use `ask_user` to resolve a gap that materially changes the result, not to transfer routine decisions back to the user.
11
11
 
12
- This skill is for decision control, research scoping, requirements gathering, and preference-sensitive planning, not general chat.
12
+ ## When to ask
13
13
 
14
- ## Trigger
14
+ Read relevant code, docs, conversation, prior answers, and the user's existing requirements and authorization. Resolve factual uncertainty through available evidence rather than asking the user to repeat it. Do not invent preferences or permission from a code convention.
15
15
 
16
- Classify the next step as one of:
16
+ Use `ask_user` when that review still leaves:
17
17
 
18
- - `high_stakes`
19
- - `ambiguous`
20
- - `both`
21
- - `clear`
18
+ - a critical requirement missing or conflicting, so proceeding would produce materially different results;
19
+ - an important preference unresolved that materially changes the outcome and cannot be inferred from the user's requirements;
20
+ - missing authorization for a consequential or hard-to-reverse next action beyond the approved scope.
22
21
 
23
- Use `ask_user` when the next step is ambiguous, preference-sensitive, or high-stakes and the user has not already made the decision explicitly.
22
+ Also use `ask_user` when the user explicitly requests an interview, requirements gathering, or interactive questions. Ask about the current topic and use existing answers rather than restarting discovery. If the user requests a written questionnaire or checklist instead, provide that artifact in prose.
24
23
 
25
- Use `ask_user` for any domain where user input changes the plan, recommendation, research direction, output format, criteria, constraints, or next action.
24
+ ## When to proceed
26
25
 
27
- Also use `ask_user` when the user asks to gather requirements, interview them, ask questions, scope research, plan work, compare options, or answer a set of open product/design/architecture/research questions. Do not respond with a plain-text questionnaire unless the user explicitly asks for a checklist or written questionnaire.
26
+ - Do not ask about facts or requirements already established in code, docs, or the conversation.
27
+ - Do not reconfirm settled choices or existing authorization. Carry out reversible steps and routine implementation details within the authorized scope; state useful assumptions without turning them into approval requests.
28
+ - Multiple viable options do not by themselves justify a question. Labels such as architecture, schema, naming, UX, planning, or research do not establish a material gap or a need for new permission.
29
+ - Complete clear comparison/research requests first. Analyze evidence and trade-offs, give conditional conclusions where appropriate, and do not automatically turn a comparison into an interview. Ask only if a remaining material gap actually blocks the requested analysis or next action.
30
+ - Treat "your call" as delegation within the stated scope, not as missing preference information. Do not let delegated autonomy waive safety boundaries or expand authorization to unrelated high-impact actions.
28
31
 
29
- ### Treat as `high_stakes` when the next step changes:
32
+ ## Keep questions focused
30
33
 
31
- - architecture, schema, API contract, deployment, or security posture
32
- - production-facing behavior in a costly-to-undo way
33
- - large refactors, migrations, or destructive edits
34
- - legal, financial, medical, career, hiring, vendor, purchasing, travel, or other costly-to-reverse decisions
35
- - public-facing claims, sensitive communications, or consequential recommendations
34
+ Explain the blocking gap and its consequence briefly, then ask one concrete decision per question using `ask_user`, not a plain-text multiple-choice detour. Ask only current blockers; bundle related blockers only if they can be answered independently. In a requested interview, keep each batch on the current topic and follow the user's requested pacing.
36
35
 
37
- ### Treat as `ambiguous` when:
36
+ Use the answer explicitly and preserve resolved decisions. After an elaboration or note, answer the clarification first; use a structured follow-up only if a material decision still blocks progress. Respect `continuation.preservedAnswers` and revisit only affected unresolved questions. Reopen a settled decision only when materially new information changes its assumptions, scope, or consequences, and explain what changed.
38
37
 
39
- - requirements, goals, constraints, evaluation criteria, or success criteria are missing/conflicting
40
- - multiple valid options exist and the trade-off is preference-sensitive
41
- - research scope, audience, budget, timeline, risk tolerance, or output format is unclear
42
- - you would otherwise make a material assumption
38
+ Cancellation, missing answers, or ambiguous responses are not approval for high-risk actions. If authorization remains missing, leave that action blocked and explain the boundary; do not automatically repeat the same question or silently choose a risky default. Continue only independent work still covered by existing authorization. `cancelled: false` and `required: true` do not prove an answer or approval exists: required is advisory, and RPC dismissal can skip a question without cancelling the flow.
43
39
 
44
- ## Handshake (required)
40
+ ## Payload and presentation
45
41
 
46
- 1. Gather evidence first from code/docs/tools.
47
- 2. Summarize neutral context (current state, constraints, trade-offs, recommendation).
48
- 3. Ask one focused `ask_user` decision question, or bundle 2-5 closely related questions when the user is explicitly in requirement-gathering/interview mode.
49
- 4. Restate the user decision and proceed explicitly with it.
50
- 5. Re-open only for materially new ambiguity.
51
-
52
- ## Question spew prevention
53
-
54
- Before sending any assistant response that contains 2+ substantive questions for the user, stop and decide whether those questions should be interactive.
55
-
56
- Use `ask_user` instead of prose when:
57
-
58
- - the questions are meant to collect requirements, goals, constraints, preferences, scope, priorities, criteria, or missing context
59
- - answers will materially change the next artifact, recommendation, research direction, plan, implementation, architecture, schema, UX, stack choice, or decision criteria
60
- - the user previously corrected you with phrases like "ask those questions", "ask interactively", or "use ask_user"
61
-
62
- Plain-text questions are acceptable only when:
63
-
64
- - the user asked for a written checklist/list of open questions
65
- - the questions are rhetorical or purely explanatory
66
- - there is exactly one small factual clarification and an interactive flow would be heavier than needed
67
-
68
- If there are too many questions, group them into the smallest coherent `ask_user` batches and ask the highest-impact batch first.
69
-
70
- ## Question budget and escalation
71
-
72
- - Max 1 `ask_user` call per decision boundary in normal cases.
73
- - Max 2 calls for the same boundary if first answer is unclear/cancelled.
74
- - Never re-ask the same trade-off without new evidence.
75
-
76
- Attempt 2 (only if needed) must be narrower and include:
77
-
78
- - `Proceed with recommended option`
79
- - `Choose another option`
80
- - `Stop for now`
81
-
82
- After attempt 2:
83
-
84
- - for `high_stakes` or `both`: stop as blocked until explicit decision
85
- - for `ambiguous` only: if user delegates ("your call"), proceed with the most reversible default and state assumptions
42
+ - Include a stable question `id`, non-empty `prompt`, and a non-empty machine-readable `value` and visible `label` for every option. Question ids must be unique within a call; option values must be unique within a question.
43
+ - Keep labels short and options distinct and outcome-oriented. Do not add filler options. Use `description` for meaningful trade-offs.
44
+ - Mark grounded preferences with `recommended: true` and explain the reason in `description`; recommendations are presentation-only and never preselected.
45
+ - Choose `single` for one expected answer, `multi` for multiple possible selections, and `preview` for richer comparison detail. Every declared preview option must include non-empty `preview` text; descriptions alone do not suffice.
46
+ - TUI provides tabbed questions, native single/multi selection, a preview pane, and an internal `Type your own` fallback for every question type, including preview.
47
+ - RPC presents questions sequentially with one real option or `Type something…` per question. Use typed input for multiple choices; previews and descriptions flatten into option text. Do not promise same-screen forms, native checkbox cards, a custom preview pane, notes, or a review tab in RPC.
86
48
 
87
- ## ask_user payload quality
49
+ ## Examples and behavioral evaluation cases
88
50
 
89
- - Ask one concrete decision at a time.
90
- - Provide clear, distinct options. Do not add filler options.
91
- - Choose question type from semantics: `single` means one answer is expected, `multi` means multiple answers could reasonably be selected, and `preview` means options need preview-pane detail with non-empty preview text.
92
- - Avoid defaulting mechanically; infer from whether options are mutually exclusive, can coexist, or need preview-pane detail.
93
- - Keep option labels short and outcome-oriented.
94
- - Include trade-off descriptions when non-obvious.
95
- - Include a stable question `id`, non-empty `prompt`, and a non-empty `value` and visible `label` for every option.
96
- - Mark grounded preferences with `recommended: true` and explain the reason in `description`; recommendations are presentation-only and never preselected.
97
- - For research/planning, ask about goals, constraints, evaluation criteria, audience, budget, timeline, risk tolerance, and desired output only when they materially affect the result.
98
- - Prefer non-`preview` questions when a free-form answer may be useful, since those include an internal `Type your own` option.
51
+ These are expected behaviors for model evaluation, not evidence that a model follows the policy. Static prompt tests check registered wording and tool constraints only.
99
52
 
100
- ## Guardrails
53
+ | Context / request | Expected behavior |
54
+ | --- | --- |
55
+ | "Fix this typo and update its test" with the target and expected text supplied | Read the relevant files and make the small change; no interview about naming, style, or alternatives. |
56
+ | "Use the existing helper; implement the approved plan" | Follow the helper and plan; do not re-ask which approach to use. |
57
+ | "Add data expiry" with no retention period in code, docs, or prior requirements | Ask for the retention requirement before implementing deletion semantics. |
58
+ | "Draft the customer announcement" but the audience and disclosure scope remain unresolved and would materially change the message | Ask only for the missing consequential content preferences, not every possible tone choice. |
59
+ | "Prepare a migration plan" followed by a proposed production migration or irreversible deletion | Ask for explicit authorization before execution; permission to plan is not permission to execute. |
60
+ | "Interview me to gather requirements" | Use `ask_user` for the current interview topic, respecting the requested pacing and prior answers. |
61
+ | "Compare SQLite and PostgreSQL for a small local app" | Analyze the comparison first, using evidence and conditional trade-offs; do not automatically ask the user to choose a database or define a full product brief. |
62
+ | "Choose the local implementation details yourself" with several reversible approaches | Use established patterns within scope and state useful assumptions; do not ask merely because alternatives exist. |
63
+ | A high-risk authorization question is cancelled, skipped, or answered vaguely | Do not execute the action or infer approval from completion metadata; explain the unresolved boundary. |
64
+ | A chosen migration was approved for staging, but new evidence shows the target is production | Reopen only the changed target/authorization decision; do not restart the whole interview. |
101
65
 
102
- - Do not ask before reading available context.
103
- - Do not use for trivial formatting/style micro-decisions.
104
- - Do not continue implementation after unclear high-stakes answers.
66
+ For actual model evaluation, run these cases in fresh sessions with the local extension alone and with the bundled skill loaded. Inspect context reads, whether and what the model asks, and its next action; include prior-answer and cancellation turns. Record model/version, loaded instructions, observed behavior, and false positives/negatives. Never execute real high-risk actions for these checks.
105
67
 
106
68
  ## Conflict rule
107
69
 
108
- If this skill conflicts with implementation behavior or tests, the project contract wins:
109
-
110
- 1. `docs/contract.md`
111
- 2. `tests/*.test.ts`
112
- 3. this skill
70
+ This guidance is advisory, not a runtime authorization mechanism. For tool behavior, [`docs/contract.md`](../../docs/contract.md) and the package tests take precedence over this skill.
@@ -13,21 +13,18 @@ import type {
13
13
  } from "./types.ts";
14
14
 
15
15
  export const ASK_TOOL_DESCRIPTION =
16
- "Interactive clarification tool for cases where the next step depends on user preferences, missing requirements, or choosing between multiple valid directions. Ask a short structured interview, collect normalized answers, and continue using those answers explicitly instead of guessing. TUI mode supports single-select, multi-select, and preview-pane questions; RPC mode presents questions sequentially, offers one portable choice per question plus a typed-answer fallback, and flattens preview details into option text. Always include a stable `id` and non-empty `prompt` for every question, plus a machine-readable `value` and visible `label` for every option. Use `preview` only when every option includes `preview` text; descriptions alone are not enough.";
16
+ "Interactive clarification after reading context: ask only for unresolved critical requirements, outcome-changing preferences, or consequential/hard-to-reverse actions beyond existing authorization; also for explicitly requested interviews, requirements gathering, or interactive questions. Multiple options alone do not justify asking. TUI supports single-select, multi-select, and preview-pane questions; RPC asks sequentially with one choice or typed input, flattening previews into option text. Include a stable `id` and non-empty `prompt` for each question, plus a non-empty machine-readable `value` and visible `label` for each option. Use `preview` only when every option has non-empty `preview` text; descriptions alone do not suffice.";
17
17
 
18
18
  export const ASK_TOOL_PROMPT_GUIDELINES = [
19
- "Use `ask_user` before making preference-sensitive decisions about scope, tone, UX, naming, architecture, docs, or implementation direction.",
20
- "When multiple valid directions exist, call `ask_user` with 1-3 concise questions instead of committing to one path on your own.",
21
- "When calling `ask_user`, prefer one focused decision per question. Use short labels. Provide clear, distinct options. Do not add filler options.",
22
- "When calling `ask_user`, always include a stable `id` and non-empty `prompt` for every question.",
23
- "When calling `ask_user`, always include a non-empty machine-readable `value` and visible `label` for every option.",
24
- "When calling `ask_user`, mark grounded preferences with `recommended: true` and use the option `description` to state the reason.",
25
- "When calling `ask_user`, choose question `type` from the question semantics: `single` means one answer is expected, `multi` means multiple answers could reasonably be selected, and `preview` means options need preview-pane detail.",
26
- 'When calling `ask_user`, use `type: "preview"` only when every option includes non-empty `preview` text. Option descriptions do not satisfy this requirement.',
27
- "After an `ask_user` elaboration or follow-up note, prefer another structured `ask_user` follow-up if a choice is still needed instead of switching to plain-text multiple choice in chat.",
28
- "When prior `ask_user` answers narrow the branch, bundle the next 2-3 related unresolved decisions into one follow-up `ask_user` call when possible.",
29
- "Use one-at-a-time `ask_user` follow-up calls only when the next question materially depends on the previous answer.",
30
- "Do not promise same-screen forms, native checkbox cards, or a custom preview pane when `ask_user` is rendered through RPC; the portable fallback asks questions sequentially, and users type multiple choices through `Type something…` when one scalar selection is insufficient.",
19
+ "Before `ask_user`, read available context: code, docs, conversation, and prior answers. Ask only if a critical requirement or outcome-changing preference remains unresolved, or a consequential or hard-to-reverse action exceeds existing authorization.",
20
+ "Use `ask_user` for explicitly requested interviews, requirements gathering, or interactive questions. Multiple options or architecture/naming/research labels alone do not justify asking; analyze clear comparison/research requests first.",
21
+ "Do not use `ask_user` to reconfirm settled choices or authorization. Proceed with authorized reversible steps and routine implementation details; state useful assumptions.",
22
+ "With `ask_user`, delegated autonomy does not waive safety boundaries. Cancellation, missing answers, or ambiguity are not high-risk approval; keep unauthorized high-risk actions blocked.",
23
+ "In `ask_user`, ask only current blockers (or the requested interview topic), one decision per question; bundle independent related questions. Answer elaboration notes first; re-ask only remaining blockers. Reopen settled decisions only for materially new information.",
24
+ "For `ask_user`, include a stable `id` and non-empty `prompt` for each question, and a non-empty machine-readable `value` and visible `label` for each option. Keep labels short and options distinct; no filler.",
25
+ "For `ask_user`, mark grounded preferences with `recommended: true` and explain the reason in `description`; recommendations are not preselected.",
26
+ "For `ask_user`, use `single` for one answer, `multi` for multiple possible selections, and `preview` only when every option has non-empty `preview` text; descriptions alone do not suffice.",
27
+ "For `ask_user` in RPC, questions are sequential with one choice or `Type something…` (including typed multiple choices); previews flatten into option text. Do not promise same-screen forms, native checkbox cards, or a custom preview pane.",
31
28
  ] as const;
32
29
 
33
30
  interface ValidateParamsOptions {
package/src/ask-tool.ts CHANGED
@@ -30,7 +30,7 @@ export function registerAskTool(
30
30
  label: "Ask User",
31
31
  description: ASK_TOOL_DESCRIPTION,
32
32
  promptSnippet:
33
- "Clarify ambiguous or preference-sensitive decisions with a short interactive interview before proceeding",
33
+ "Ask only for material requirement/preference or high-impact authorization gaps left after context review, or explicitly requested interviews",
34
34
  promptGuidelines: [...ASK_TOOL_PROMPT_GUIDELINES],
35
35
  parameters: AskParamsSchema,
36
36
  prepareArguments: (args) => prepareAskParams(args) as AskParams,