# Questionnaire trigger gap ## Finding The `questionnaire` extension exists in the repo at `/home/sebas/pi-config/extensions/questionnaire.ts`, but it is not currently loaded by Pi from `settings.json`. Current `packages` list in `settings.json`: - `git:github.com/apmantza/pi-free` - `npm:pi-btw` - `../../../home/sebas/.agents/extensions/resume-hint/resume-hint.js` - `/home/sebas/pi-config/extensions/session-switch/index.ts` - `npm:@juicesharp/rpiv-todo` - `/mnt/rpi/dev/pi-telegram-sebas` So the questionnaire tool cannot trigger because Pi never loads it. ## Second finding Even if loaded, `questionnaire.ts` only registers a tool. It does not contain any automatic hook like: - `session_start` - `before_user_message` - `before_tool` - any intent-detection trigger So it is a UI/tool primitive, not an intent-clearing policy engine. ## Likely history The extension was implemented as a reusable way to ask structured questions, but no orchestration layer was added to decide when to call it automatically. ## Implication Two separate missing links: 1. not installed/loaded 2. no auto-trigger policy ## Recommendation Do this in stages: ### Stage 1 Load the extension in `settings.json`. ### Stage 2 Decide desired trigger policy. Likely one of: - manual only: agent calls `questionnaire` when intent is unclear - guided auto-trigger: a small extension/hook inspects the task and prompts the agent/user when objective/done/exclusions/truth limits are missing - hard gate for some task classes: coding/repo work must lock intent before execution ### Stage 3 Prefer a small intent-gate helper over trying to make `questionnaire` itself smart. Suggested split: - `questionnaire.ts` = generic UI tool - new intent-gate layer = decides when to invoke it ## Minimal next implementation - add `/home/sebas/pi-config/extensions/questionnaire.ts` to `settings.json` - add a lightweight `intent-gate` extension or command that checks for: - objective - done gate - exclusions - reality constraints - have that layer call `questionnaire` only when one of those is missing and the task is meaningful enough to justify interruption