forked from bchanot/claude
fix(memory): hook comments and payloads reference the renamed global memory
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
# One-shot escape hatch: create .claude/.config-edit-ok (CWD-relative) with a
|
# One-shot escape hatch: create .claude/.config-edit-ok (CWD-relative) with a
|
||||||
# NON-EMPTY reason inside; the hook logs the reason, consumes (rm) the sentinel,
|
# NON-EMPTY reason inside; the hook logs the reason, consumes (rm) the sentinel,
|
||||||
# and allows that single edit. It never persists — a lingering sentinel would be
|
# and allows that single edit. It never persists — a lingering sentinel would be
|
||||||
# a footgun. Discipline, per CLAUDE.md "Root causes only. No temp fixes.": fix
|
# a footgun. Discipline, per CLAUDE.global.md "Root causes only. No temp fixes.": fix
|
||||||
# the code, don't loosen the gate. Fails OPEN (exit 0) on parse failure so it can
|
# the code, don't loosen the gate. Fails OPEN (exit 0) on parse failure so it can
|
||||||
# never wedge editing.
|
# never wedge editing.
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ cat >&2 <<EOF
|
|||||||
This is a guardrail (permission/hook registry, gitflow enforcement, git
|
This is a guardrail (permission/hook registry, gitflow enforcement, git
|
||||||
pre-commit guard, a hook, the test suite, health diagnostic, or lint config).
|
pre-commit guard, a hook, the test suite, health diagnostic, or lint config).
|
||||||
Don't weaken the gate to make an error pass — fix the root cause instead
|
Don't weaken the gate to make an error pass — fix the root cause instead
|
||||||
(CLAUDE.md: "Root causes only. No temp fixes."). To make one intended edit,
|
(global CLAUDE.md: "Root causes only. No temp fixes."). To make one intended edit,
|
||||||
create .claude/.config-edit-ok with a non-empty reason; it is logged and
|
create .claude/.config-edit-ok with a non-empty reason; it is logged and
|
||||||
consumed (one-shot).
|
consumed (one-shot).
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# design-toolchain-reminder.sh
|
# design-toolchain-reminder.sh
|
||||||
#
|
#
|
||||||
# UserPromptSubmit hook. When the prompt carries a UI/design signal, inject a
|
# UserPromptSubmit hook. When the prompt carries a UI/design signal, inject a
|
||||||
# reminder to mobilize the full design toolchain (tiered by scope, per CLAUDE.md
|
# reminder to mobilize the full design toolchain (tiered by scope, per CLAUDE.global.md
|
||||||
# "Design work — full toolchain"). A UserPromptSubmit hook's stdout is appended
|
# "Design work — full toolchain"). A UserPromptSubmit hook's stdout is appended
|
||||||
# to the model's context, so the cat block below becomes additional guidance.
|
# to the model's context, so the cat block below becomes additional guidance.
|
||||||
#
|
#
|
||||||
@@ -26,7 +26,7 @@ prompt="$(printf '%s' "$input" \
|
|||||||
[ -z "$prompt" ] && prompt="$input"
|
[ -z "$prompt" ] && prompt="$input"
|
||||||
|
|
||||||
# Harness-generated turns (subagent/task notifications) are not user
|
# Harness-generated turns (subagent/task notifications) are not user
|
||||||
# requests — never fire on them (CLAUDE.md trigger = a design/UI *request*).
|
# requests — never fire on them (CLAUDE.global.md trigger = a design/UI *request*).
|
||||||
case "$prompt" in
|
case "$prompt" in
|
||||||
'<task-notification>'*) exit 0 ;;
|
'<task-notification>'*) exit 0 ;;
|
||||||
esac
|
esac
|
||||||
@@ -54,7 +54,7 @@ if printf '%s' "$lc" | grep -Eq "$pattern"; then
|
|||||||
"$(printf '%s' "$lc" | grep -oiE "$pattern" | head -1 || true)" \
|
"$(printf '%s' "$lc" | grep -oiE "$pattern" | head -1 || true)" \
|
||||||
"$(printf '%s' "$prompt" | tr '\n\t' ' ' | cut -c1-100)" >> "$logf" 2>/dev/null || true
|
"$(printf '%s' "$prompt" | tr '\n\t' ' ' | cut -c1-100)" >> "$logf" 2>/dev/null || true
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
Design work detected → apply CLAUDE.md section "Design work — full toolchain" (already in context). Trivial (≤2 files, cosmetic) → /hotfix.
|
Design work detected → apply global CLAUDE.md section "Design work — full toolchain" (already in context). Trivial (≤2 files, cosmetic) → /hotfix.
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -576,7 +576,7 @@ echo ""
|
|||||||
# subscription plan its ~75% output-token compression has no cost benefit,
|
# subscription plan its ~75% output-token compression has no cost benefit,
|
||||||
# and the plugin's always-on SessionStart/UserPromptSubmit hooks added
|
# and the plugin's always-on SessionStart/UserPromptSubmit hooks added
|
||||||
# friction on validation gates and client deliverables. The unrelated
|
# friction on validation gates and client deliverables. The unrelated
|
||||||
# memory-registry terse-format convention (CLAUDE.md) is kept.
|
# memory-registry terse-format convention (CLAUDE.global.md) is kept.
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# STEP 6 — CONTEXT7 CLI (ctx7)
|
# STEP 6 — CONTEXT7 CLI (ctx7)
|
||||||
|
|||||||
Reference in New Issue
Block a user