diff --git a/autoplan/SKILL.md b/autoplan/SKILL.md index 0e77d8196..f8c20cd59 100644 --- a/autoplan/SKILL.md +++ b/autoplan/SKILL.md @@ -654,7 +654,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"autoplan","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/canary/SKILL.md b/canary/SKILL.md index 2693319be..e7a1715f8 100644 --- a/canary/SKILL.md +++ b/canary/SKILL.md @@ -646,7 +646,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"canary","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/codex/SKILL.md b/codex/SKILL.md index 24331dde3..af351d7f1 100644 --- a/codex/SKILL.md +++ b/codex/SKILL.md @@ -649,7 +649,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"codex","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/context-restore/SKILL.md b/context-restore/SKILL.md index 22e499dd2..7a272722e 100644 --- a/context-restore/SKILL.md +++ b/context-restore/SKILL.md @@ -650,7 +650,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"context-restore","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/context-save/SKILL.md b/context-save/SKILL.md index f41551d78..014407fbe 100644 --- a/context-save/SKILL.md +++ b/context-save/SKILL.md @@ -649,7 +649,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"context-save","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/cso/SKILL.md b/cso/SKILL.md index 3e39ce4c5..0d7379591 100644 --- a/cso/SKILL.md +++ b/cso/SKILL.md @@ -652,7 +652,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"cso","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/design-consultation/SKILL.md b/design-consultation/SKILL.md index 235026d2f..1e8762964 100644 --- a/design-consultation/SKILL.md +++ b/design-consultation/SKILL.md @@ -672,7 +672,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"design-consultation","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/design-html/SKILL.md b/design-html/SKILL.md index 70b87ff7e..2d1b3cfb5 100644 --- a/design-html/SKILL.md +++ b/design-html/SKILL.md @@ -653,7 +653,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"design-html","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/design-review/SKILL.md b/design-review/SKILL.md index 33c43ceb5..97f365f13 100644 --- a/design-review/SKILL.md +++ b/design-review/SKILL.md @@ -650,7 +650,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"design-review","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/design-shotgun/SKILL.md b/design-shotgun/SKILL.md index 71f1a0256..b504b79fe 100644 --- a/design-shotgun/SKILL.md +++ b/design-shotgun/SKILL.md @@ -667,7 +667,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"design-shotgun","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/devex-review/SKILL.md b/devex-review/SKILL.md index a15ed7879..14ed560d2 100644 --- a/devex-review/SKILL.md +++ b/devex-review/SKILL.md @@ -652,7 +652,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"devex-review","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/document-generate/SKILL.md b/document-generate/SKILL.md index cb89b4ee5..ae9745a0b 100644 --- a/document-generate/SKILL.md +++ b/document-generate/SKILL.md @@ -652,7 +652,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"document-generate","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/document-release/SKILL.md b/document-release/SKILL.md index 3fc606e8a..42af6fc12 100644 --- a/document-release/SKILL.md +++ b/document-release/SKILL.md @@ -650,7 +650,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"document-release","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/health/SKILL.md b/health/SKILL.md index ef63acaf6..921a7b5b4 100644 --- a/health/SKILL.md +++ b/health/SKILL.md @@ -648,7 +648,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"health","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/investigate/SKILL.md b/investigate/SKILL.md index f1d12dd1e..daf6be6d8 100644 --- a/investigate/SKILL.md +++ b/investigate/SKILL.md @@ -687,7 +687,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"investigate","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/ios-clean/SKILL.md b/ios-clean/SKILL.md index f925bc948..0a2ecd992 100644 --- a/ios-clean/SKILL.md +++ b/ios-clean/SKILL.md @@ -650,7 +650,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"ios-clean","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/ios-design-review/SKILL.md b/ios-design-review/SKILL.md index 76f9629f9..7bfbdd851 100644 --- a/ios-design-review/SKILL.md +++ b/ios-design-review/SKILL.md @@ -652,7 +652,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"ios-design-review","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/ios-fix/SKILL.md b/ios-fix/SKILL.md index 11d7a3f1b..2d1c3d4b1 100644 --- a/ios-fix/SKILL.md +++ b/ios-fix/SKILL.md @@ -653,7 +653,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"ios-fix","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/ios-qa/SKILL.md b/ios-qa/SKILL.md index 1080896c5..0d40c16e5 100644 --- a/ios-qa/SKILL.md +++ b/ios-qa/SKILL.md @@ -656,7 +656,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"ios-qa","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/ios-sync/SKILL.md b/ios-sync/SKILL.md index 2e0f703af..e7a803924 100644 --- a/ios-sync/SKILL.md +++ b/ios-sync/SKILL.md @@ -650,7 +650,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"ios-sync","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/land-and-deploy/SKILL.md b/land-and-deploy/SKILL.md index 8bfec441c..2eb9faa6c 100644 --- a/land-and-deploy/SKILL.md +++ b/land-and-deploy/SKILL.md @@ -645,7 +645,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"land-and-deploy","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/landing-report/SKILL.md b/landing-report/SKILL.md index 442c28d7f..aec9978ba 100644 --- a/landing-report/SKILL.md +++ b/landing-report/SKILL.md @@ -646,7 +646,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"landing-report","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/learn/SKILL.md b/learn/SKILL.md index 3eb54e696..08a78b23c 100644 --- a/learn/SKILL.md +++ b/learn/SKILL.md @@ -648,7 +648,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"learn","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/office-hours/SKILL.md b/office-hours/SKILL.md index bfa14d6bd..6da8235ef 100644 --- a/office-hours/SKILL.md +++ b/office-hours/SKILL.md @@ -683,7 +683,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"office-hours","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/open-gstack-browser/SKILL.md b/open-gstack-browser/SKILL.md index ef01414de..64a93770e 100644 --- a/open-gstack-browser/SKILL.md +++ b/open-gstack-browser/SKILL.md @@ -645,7 +645,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"open-gstack-browser","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/pair-agent/SKILL.md b/pair-agent/SKILL.md index baa1553b7..533a29dc7 100644 --- a/pair-agent/SKILL.md +++ b/pair-agent/SKILL.md @@ -647,7 +647,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"pair-agent","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/plan-ceo-review/SKILL.md b/plan-ceo-review/SKILL.md index 526bb0e2e..e0dc438fe 100644 --- a/plan-ceo-review/SKILL.md +++ b/plan-ceo-review/SKILL.md @@ -677,7 +677,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"plan-ceo-review","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/plan-design-review/SKILL.md b/plan-design-review/SKILL.md index ce70998cd..c0049100c 100644 --- a/plan-design-review/SKILL.md +++ b/plan-design-review/SKILL.md @@ -649,7 +649,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"plan-design-review","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/plan-devex-review/SKILL.md b/plan-devex-review/SKILL.md index 2bb031cbf..a419b85f3 100644 --- a/plan-devex-review/SKILL.md +++ b/plan-devex-review/SKILL.md @@ -655,7 +655,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"plan-devex-review","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/plan-eng-review/SKILL.md b/plan-eng-review/SKILL.md index b6cd23441..f46699dd8 100644 --- a/plan-eng-review/SKILL.md +++ b/plan-eng-review/SKILL.md @@ -653,7 +653,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"plan-eng-review","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/plan-tune/SKILL.md b/plan-tune/SKILL.md index 17240a591..8e61abc58 100644 --- a/plan-tune/SKILL.md +++ b/plan-tune/SKILL.md @@ -658,7 +658,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"plan-tune","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/qa-only/SKILL.md b/qa-only/SKILL.md index 7a58b76ed..db1c3dd08 100644 --- a/qa-only/SKILL.md +++ b/qa-only/SKILL.md @@ -648,7 +648,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"qa-only","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/qa/SKILL.md b/qa/SKILL.md index 6779c47cf..c5fdf9b56 100644 --- a/qa/SKILL.md +++ b/qa/SKILL.md @@ -654,7 +654,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"qa","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/retro/SKILL.md b/retro/SKILL.md index ddbee1551..287f24e35 100644 --- a/retro/SKILL.md +++ b/retro/SKILL.md @@ -665,7 +665,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"retro","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/review/SKILL.md b/review/SKILL.md index dd6914a88..4d8049d54 100644 --- a/review/SKILL.md +++ b/review/SKILL.md @@ -650,7 +650,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"review","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/scrape/SKILL.md b/scrape/SKILL.md index dccdd0db7..0af5db506 100644 --- a/scrape/SKILL.md +++ b/scrape/SKILL.md @@ -646,7 +646,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"scrape","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/scripts/resolvers/question-tuning.ts b/scripts/resolvers/question-tuning.ts index f312b1d17..d9c843a3e 100644 --- a/scripts/resolvers/question-tuning.ts +++ b/scripts/resolvers/question-tuning.ts @@ -25,7 +25,11 @@ export function generateQuestionTuning(ctx: TemplateContext): string { Before each AskUserQuestion, choose \`question_id\` from \`scripts/question-registry.ts\` or \`{skill}-{slug}\`, then run \`${bin}/gstack-question-preference --check ""\`. \`AUTO_DECIDE\` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." \`ASK_NORMALLY\` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append \`\` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered \`question_id\`. + +**Embed the option recommendation via the \`(recommended)\` label suffix** on exactly one option per AUQ. The PreToolUse hook parses \`(recommended)\` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two \`(recommended)\` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): \`\`\`bash ${bin}/gstack-question-log '{"skill":"${ctx.skillName}","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true \`\`\` diff --git a/setup-deploy/SKILL.md b/setup-deploy/SKILL.md index 3e69b015d..a35ab9764 100644 --- a/setup-deploy/SKILL.md +++ b/setup-deploy/SKILL.md @@ -649,7 +649,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"setup-deploy","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/setup-gbrain/SKILL.md b/setup-gbrain/SKILL.md index 12d8e2ce1..e0415d564 100644 --- a/setup-gbrain/SKILL.md +++ b/setup-gbrain/SKILL.md @@ -648,7 +648,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"setup-gbrain","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/ship/SKILL.md b/ship/SKILL.md index 9611072f7..d4d0039d8 100644 --- a/ship/SKILL.md +++ b/ship/SKILL.md @@ -650,7 +650,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"ship","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/skillify/SKILL.md b/skillify/SKILL.md index 8b81f1ce8..e7911473e 100644 --- a/skillify/SKILL.md +++ b/skillify/SKILL.md @@ -646,7 +646,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"skillify","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/spec/SKILL.md b/spec/SKILL.md index 3e7187d18..72100f840 100644 --- a/spec/SKILL.md +++ b/spec/SKILL.md @@ -647,7 +647,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"spec","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` @@ -1586,7 +1590,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"spec","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/sync-gbrain/SKILL.md b/sync-gbrain/SKILL.md index 96ac9057a..ffb05ddb9 100644 --- a/sync-gbrain/SKILL.md +++ b/sync-gbrain/SKILL.md @@ -648,7 +648,11 @@ If you are looping on the same diagnostic, same file, or failed fix variants, ST Before each AskUserQuestion, choose `question_id` from `scripts/question-registry.ts` or `{skill}-{slug}`, then run `~/.claude/skills/gstack/bin/gstack-question-preference --check ""`. `AUTO_DECIDE` means choose the recommended option and say "Auto-decided [summary] → [option] (your preference). Change with /plan-tune." `ASK_NORMALLY` means ask. -After answer, log best-effort: +**Embed the question_id as a marker in the question text** so hooks can identify it deterministically (plan-tune cathedral T14 / D18 progressive markers). Append `` somewhere in the rendered question (the leading line or trailing line is fine; the marker doesn't render visibly to the user when wrapped in HTML-style angle brackets, but the hook strips it). Without the marker the PreToolUse enforcement hook treats the AUQ as observed-only and never auto-decides — so always include it when the question matches a registered `question_id`. + +**Embed the option recommendation via the `(recommended)` label suffix** on exactly one option per AUQ. The PreToolUse hook parses `(recommended)` first, falls back to "Recommendation: X" prose, and refuses to auto-decide if ambiguous. Two `(recommended)` labels = refuse. + +After answer, log best-effort (PostToolUse hook also captures deterministically when installed; dedup on (source, tool_use_id) handles double-writes): ```bash ~/.claude/skills/gstack/bin/gstack-question-log '{"skill":"sync-gbrain","question_id":"","question_summary":"","category":"","door_type":"","options_count":N,"user_choice":"","recommended":"","session_id":"'"$_SESSION_ID"'"}' 2>/dev/null || true ``` diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 0a0c9741b..b6dc69861 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -323,10 +323,14 @@ describe('gen-skill-docs', () => { // Ratcheted 36500 → 39000 in the contributor wave when #1205 added the // \\u-escape CJK rule (rule 12 + self-check item) to the AskUserQuestion // preamble. + // Ratcheted 39000 → 40000 in plan-tune cathedral T14: question-tuning + // resolver gained the marker convention + the + // (recommended) label requirement (D2 + D18 — both load-bearing for + // hook enforcement). Adds ~700 bytes. for (const skill of reviewSkills) { const content = fs.readFileSync(skill.path, 'utf-8'); const preamble = extractPreambleBeforeWorkflow(content, skill.markers); - expect(Buffer.byteLength(preamble, 'utf-8')).toBeLessThan(39_000); + expect(Buffer.byteLength(preamble, 'utf-8')).toBeLessThan(40_000); } });