mirror of https://github.com/garrytan/gstack.git
feat(config): add plan_tune_hooks setting (prompt|yes|no)
Registers a new gstack-config key controlling whether ./setup installs the plan-tune Claude Code hooks. Default "prompt". Documented in the config header and surfaced in `gstack-config defaults` / `list`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dedfe42ef0
commit
b1a068e332
|
|
@ -75,6 +75,16 @@ CONFIG_HEADER='# gstack configuration — edit freely, changes take effect on ne
|
||||||
# # Set to true once the privacy gate has asked the user.
|
# # Set to true once the privacy gate has asked the user.
|
||||||
# # Flip back to false to be re-prompted.
|
# # Flip back to false to be re-prompted.
|
||||||
#
|
#
|
||||||
|
# ─── Plan-tune hooks ─────────────────────────────────────────────────
|
||||||
|
# plan_tune_hooks: prompt # Controls whether ./setup installs the plan-tune
|
||||||
|
# # Claude Code hooks (PostToolUse capture +
|
||||||
|
# # PreToolUse preference enforcement).
|
||||||
|
# # prompt — ask on a real TTY, skip otherwise (default)
|
||||||
|
# # yes — install non-interactively
|
||||||
|
# # no — skip non-interactively
|
||||||
|
# # Override per-run: ./setup --plan-tune-hooks /
|
||||||
|
# # --no-plan-tune-hooks, or env GSTACK_PLAN_TUNE_HOOKS.
|
||||||
|
#
|
||||||
# ─── Advanced ────────────────────────────────────────────────────────
|
# ─── Advanced ────────────────────────────────────────────────────────
|
||||||
# codex_reviews: enabled # disabled = skip Codex adversarial reviews in /ship
|
# codex_reviews: enabled # disabled = skip Codex adversarial reviews in /ship
|
||||||
# gstack_contributor: false # true = file field reports when gstack misbehaves
|
# gstack_contributor: false # true = file field reports when gstack misbehaves
|
||||||
|
|
@ -110,6 +120,8 @@ lookup_default() {
|
||||||
cross_project_learnings) echo "" ;; # intentionally empty → unset triggers first-time prompt
|
cross_project_learnings) echo "" ;; # intentionally empty → unset triggers first-time prompt
|
||||||
artifacts_sync_mode) echo "off" ;;
|
artifacts_sync_mode) echo "off" ;;
|
||||||
artifacts_sync_mode_prompted) echo "false" ;;
|
artifacts_sync_mode_prompted) echo "false" ;;
|
||||||
|
plan_tune_hooks) echo "prompt" ;; # prompt | yes | no — controls ./setup plan-tune hook install
|
||||||
|
|
||||||
redact_repo_visibility) echo "" ;; # empty → fall through to gh/glab detection
|
redact_repo_visibility) echo "" ;; # empty → fall through to gh/glab detection
|
||||||
redact_prepush_hook) echo "false" ;;
|
redact_prepush_hook) echo "false" ;;
|
||||||
# Brain-aware planning (v1.48 / T5+T10+T16). Defaults documented inline:
|
# Brain-aware planning (v1.48 / T5+T10+T16). Defaults documented inline:
|
||||||
|
|
@ -315,7 +327,7 @@ case "${1:-}" in
|
||||||
for KEY in proactive routing_declined telemetry auto_upgrade update_check \
|
for KEY in proactive routing_declined telemetry auto_upgrade update_check \
|
||||||
skill_prefix checkpoint_mode checkpoint_push explain_level \
|
skill_prefix checkpoint_mode checkpoint_push explain_level \
|
||||||
codex_reviews gstack_contributor skip_eng_review workspace_root \
|
codex_reviews gstack_contributor skip_eng_review workspace_root \
|
||||||
artifacts_sync_mode artifacts_sync_mode_prompted; do
|
artifacts_sync_mode artifacts_sync_mode_prompted plan_tune_hooks; do
|
||||||
VALUE=$(grep -E "^${KEY}:" "$CONFIG_FILE" 2>/dev/null | tail -1 | awk '{print $2}' | tr -d '[:space:]' || true)
|
VALUE=$(grep -E "^${KEY}:" "$CONFIG_FILE" 2>/dev/null | tail -1 | awk '{print $2}' | tr -d '[:space:]' || true)
|
||||||
SOURCE="default"
|
SOURCE="default"
|
||||||
if [ -n "$VALUE" ]; then
|
if [ -n "$VALUE" ]; then
|
||||||
|
|
@ -331,7 +343,7 @@ case "${1:-}" in
|
||||||
for KEY in proactive routing_declined telemetry auto_upgrade update_check \
|
for KEY in proactive routing_declined telemetry auto_upgrade update_check \
|
||||||
skill_prefix checkpoint_mode checkpoint_push explain_level \
|
skill_prefix checkpoint_mode checkpoint_push explain_level \
|
||||||
codex_reviews gstack_contributor skip_eng_review workspace_root \
|
codex_reviews gstack_contributor skip_eng_review workspace_root \
|
||||||
artifacts_sync_mode artifacts_sync_mode_prompted; do
|
artifacts_sync_mode artifacts_sync_mode_prompted plan_tune_hooks; do
|
||||||
printf ' %-24s %s\n' "$KEY:" "$(lookup_default "$KEY")"
|
printf ' %-24s %s\n' "$KEY:" "$(lookup_default "$KEY")"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue