← Catalog

@maxpaulus/pi-ask

Batched design questions with recommendations and keyboard answers for pi.

Package

Install

Install with PiG

pig install npm:@maxpaulus/pi-ask

Install with Pi

pi install npm:@maxpaulus/pi-ask
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.1 (README.md). PiG does not review it.

pi-ask

A pi extension exposing ask_question: answer a batch of design questions with recommendations, multiple-choice options, or your own text. Review and edit your answers before submitting the whole batch to the model.

Try it

pi -e ./index.ts

Then ask:

Help me design a small habit tracker. Use ask_question to ask me questions with recommendations until we have a shared understanding. Don't implement anything yet.

Install

From this directory:

pi install "$PWD"

Run /reload in an existing pi session. Local installation references this directory, so edits take effect after /reload.

Controls

KeyAction
↑ / ↓, EnterChoose and save an option; advance to the next question
1–8Save that numbered option and advance
9Write your own answer
eChoose the highlighted option and add to it
Tab / Shift+Tab or ← / →Move between questions and the review page
Enter in text editorSave your custom answer
Shift+EnterNewline in custom answer
Esc in text editorReturn to choices, keeping your draft
Esc in choices/reviewCancel the whole batch; submit no answers
PgUp / PgDnScroll long content inside the panel

The panel keeps the same height across choices, custom answers, and review: half the terminal height, capped at 24 lines, leaving room for the conversation. Description space is reserved for the longest option, and keyboard hints stay pinned at the bottom. Long content scrolls with PgUp/PgDn.

The review page has Submit all answers and entries for revisiting each question. Unanswered questions block submission. Recommendations receive a ★ Recommended label, a highlighted explanation, and initial keyboard focus—not automatic consent. Pi's configured selection and editor keys also apply.

Each call accepts 1–8 questions with 2–8 options each. Custom answers allow up to 2000 characters. This is a terminal UI extension; RPC, JSON, and print modes return an error asking the model to use plain-text questions instead.

The model can call the tool again for dependent follow-up questions. The extension does not force an interview on every request or restrict other tools; ask explicitly for discussion before implementation if that's what you want.

Tool input

{
  "questions": [{
    "question": "Where should we store the data?",
    "options": [
      { "label": "SQLite", "description": "A local file; no server to manage." },
      { "label": "Postgres", "description": "A shared server for multiple writers." }
    ],
    "recommended": 1,
    "reason": "This is a single-user app, so SQLite keeps setup simple."
  }]
}

recommended is optional and 1-based. Custom answers are always available. Results include each question, its answer, and the option number (null for custom text). Model-facing result text is capped at 50 KB / 2000 lines with an explicit truncation notice; complete answers remain in the session's tool details.

Development

npm install
npm test
npm run check

Uses only pi's bundled packages at runtime. The test drives the real UI components with simulated keyboard input; it covers review, edits, custom drafts, cancellation, abort, validation, and rendering widths. Interaction follows pi's bundled questionnaire.ts example.