Add question-reframing guidance to CLAUDE.md; commit accumulated project files
- CLAUDE.md: add "Question the question" and "One clarifying question" rules to Tone and Interaction — XY problem detection, false premise checks, and explicit reframe pattern before answering - Add claude/ detail-file directory (topic docs referenced from CLAUDE.md) - Add ABOUT.md, FUTURE.md - Update memory/, scripts/, settings.yaml with accumulated session changes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,26 @@ DATA=$(cat)
|
||||
SESSION_ID=$(echo "$DATA" | jq -r '.session_id // empty')
|
||||
MODEL=$(echo "$DATA" | jq -r '.model.display_name // "unknown"')
|
||||
CONTEXT_PCT=$(echo "$DATA" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1)
|
||||
FIVE_HR=$(echo "$DATA" | jq -r '.rate_limits.five_hour.used_percentage // empty' | cut -d. -f1)
|
||||
SEVEN_DAY=$(echo "$DATA" | jq -r '.rate_limits.seven_day.used_percentage // empty' | cut -d. -f1)
|
||||
|
||||
MODE_TAG=""
|
||||
MODEL_DISPLAY="$MODEL"
|
||||
if [[ -n "${CLAUDE_CONFIG_DIR:-}" && -f "$CLAUDE_CONFIG_DIR/active-mode.env" ]]; then
|
||||
env_file="$CLAUDE_CONFIG_DIR/active-mode.env"
|
||||
MODE_TAG=$(grep '^CLAUDE_MODE_TAG=' "$env_file" 2>/dev/null | cut -d= -f2- || true)
|
||||
raw_driver=$(grep '^CLAUDE_DRIVER=' "$env_file" 2>/dev/null | cut -d= -f2- || true)
|
||||
escalates_to=$(grep '^CLAUDE_ESCALATES_TO=' "$env_file" 2>/dev/null | cut -d= -f2- || true)
|
||||
if [[ -n "$raw_driver" ]]; then
|
||||
# Capitalize first letter of driver (sonnet→Sonnet, haiku→Haiku, opus→Opus)
|
||||
driver_cap="$(tr '[:lower:]' '[:upper:]' <<< "${raw_driver:0:1}")${raw_driver:1}"
|
||||
if [[ "$escalates_to" == "opus" ]]; then
|
||||
MODEL_DISPLAY="${driver_cap}→Opus"
|
||||
else
|
||||
MODEL_DISPLAY="$driver_cap"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
TOPIC=""
|
||||
if [[ -n "$SESSION_ID" ]]; then
|
||||
@@ -33,8 +53,23 @@ if [[ -n "$SESSION_ID" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$TOPIC" ]]; then
|
||||
echo "[$MODEL] $TOPIC | ${CONTEXT_PCT}% context"
|
||||
else
|
||||
echo "[$MODEL] ${CONTEXT_PCT}% context"
|
||||
USAGE=""
|
||||
if [[ -n "$FIVE_HR" ]]; then
|
||||
USAGE=" | 5h: ${FIVE_HR}%"
|
||||
if [[ -n "$SEVEN_DAY" ]]; then
|
||||
USAGE="$USAGE 7d: ${SEVEN_DAY}%"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Prepend mode tag to topic if set
|
||||
if [[ -n "$MODE_TAG" && -n "$TOPIC" ]]; then
|
||||
TOPIC="${MODE_TAG} · ${TOPIC}"
|
||||
elif [[ -n "$MODE_TAG" ]]; then
|
||||
TOPIC="$MODE_TAG"
|
||||
fi
|
||||
|
||||
if [[ -n "$TOPIC" ]]; then
|
||||
echo "[$MODEL_DISPLAY] $TOPIC | ${CONTEXT_PCT}% context${USAGE}"
|
||||
else
|
||||
echo "[$MODEL_DISPLAY] ${CONTEXT_PCT}% context${USAGE}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user