fix: question-tuning commands carry no free text

The question log took the summary in single quotes and the preference write
took the user's own words; an apostrophe ended the quote and the rest ran as
shell. The summary is now a kebab-case slug (an identifier with a grammar),
and the optional free_text field is no longer passed from skills (the
binary still accepts it).
This commit is contained in:
garrytan committed 2026-10-06 20:34:58 +00:00
1 parent 7b997838c4
commit 7d9e37ffd6
42 files changed
+84 -84

No files matched your search

+2 -2
View File
@@ -35,7 +35,7 @@ Before each decision brief (AskUserQuestion or Conductor/fallback prose), choose
After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes). Substitute \`SESSION_ID\` with the value the preamble's skill-start output echoed — shell variables do not survive between Bash calls:
\`\`\`bash
${bin}/gstack-question-log '{"skill":"${ctx.skillName}","question_id":"<id>","question_summary":"<short>","category":"<approval|clarification|routing|cherry-pick|feedback-loop>","door_type":"<one-way|two-way>","options_count":N,"user_choice":"<key>","recommended":"<key>","session_id":"SESSION_ID"}' 2>/dev/null || true
${bin}/gstack-question-log '{"skill":"${ctx.skillName}","question_id":"<id>","question_summary":"<summary-slug>","category":"<approval|clarification|routing|cherry-pick|feedback-loop>","door_type":"<one-way|two-way>","options_count":N,"user_choice":"<key>","recommended":"<key>","session_id":"SESSION_ID"}' 2>/dev/null || true
\`\`\`
For two-way questions, offer: "Tune this question? Reply \`tune: never-ask\`, \`tune: always-ask\`, or free-form."
@@ -44,7 +44,7 @@ User-origin gate (profile-poisoning defense): write tune events ONLY when \`tune
Write (only after confirmation for free-form):
\`\`\`bash
${bin}/gstack-question-preference --write '{"question_id":"<id>","preference":"<pref>","source":"inline-user","free_text":"<optional original words>"}'
${bin}/gstack-question-preference --write '{"question_id":"<id>","preference":"<pref>","source":"inline-user"}'
\`\`\`
Exit code 2 = rejected as not user-originated; do not retry. On success: "Set \`<id>\` → \`<preference>\`. Active immediately."`;