@pi-vault/pi-questionnaire
v0.1.0
Published
Pi extension for collecting structured user decisions in one interactive questionnaire
Downloads
67
Maintainers
Readme
@pi-vault/pi-questionnaire
Stop guessing and ask better follow-up questions. @pi-vault/pi-questionnaire adds a questionnaire tool to Pi so an agent can collect several related answers in one focused interaction.
Use it when you want the agent to pause, ask a few structured questions, and then continue with clearer input.
Install
pi install npm:@pi-vault/pi-questionnaireThen reload Pi:
/reloadGood uses
Use questionnaire for things like:
- narrowing scope before implementation
- choosing between a few approaches
- collecting rollout or release preferences
- confirming priorities before the agent starts work
- batching several related decisions into one prompt
If the user is already talking through the problem in free-form, normal conversation is usually better.
What it feels like to use
The user sees one question at a time in an interactive terminal flow, then reviews everything before submitting.
A question can lead to any of these outcomes:
- pick one option
- pick several options
- type a custom answer
- say “Chat about this” instead
- add a note with extra context
That makes it useful when you want structure without forcing every answer into a rigid preset.
Typical example
A release-planning questionnaire might look like this:
questionnaire({
questions: [
{
type: "single-choice",
id: "scope",
header: "Scope",
prompt: "Which scope should we ship first?",
options: [
{
value: "small",
label: "Small",
description: "Minimal release scope",
},
{ value: "full", label: "Full", description: "Broader first release" },
],
recommendation: "small",
allowOther: true,
allowChat: true,
},
{
type: "multi-choice",
id: "checks",
header: "Checks",
prompt: "Which release checks should we run?",
options: [
{ value: "lint", label: "Lint" },
{ value: "types", label: "Typecheck" },
{ value: "tests", label: "Tests" },
],
recommendation: ["lint", "types", "tests"],
allowChat: true,
},
],
});What the agent gets back
After submission, the tool returns a compact summary the agent can use immediately.
Example:
Scope: user selected: 1. Small
Scope note: "keep the first release tight"
Checks: user selected: 1. Lint, 2. Typecheck, 3. TestsIt can also capture answers like:
Scope: user wrote: "Ship only the core questionnaire flow"
Features: user wants to discuss this questionWriting better questionnaires
A few habits make the tool work better:
- keep it short
- ask only questions that affect the next decision
- offer clear, concrete options
- include a recommended option when you have one
- leave
allowOtheron when a custom answer might matter - leave
allowChaton when the user may need to talk something through
License
MIT
