auto-detect plan, complexity scoring, ctx7 cache, graphify in workflows

- detect_plan() auto-detects Max/Pro/Free from ~/.claude.json
- session-start budget adapts to plan (Max=20k, Pro=11k, Free=5k)
- token counting now uses only ACTIVE plugins, not installed binaries
- statusline shows plan label + session duration instead of start time
- plugin-advisor: complexity assessment (0-100%) drives tool selection
- plugin-advisor: auto-activation with confirmation (PHASE 4)
- ruflo OFF by default, GSD v2 preferred for multi-session
- init-project: ctx7 pre-fetch + graphify scaffold + graphify full
- ship-feature: ctx7 cache check before implementation
- frontend-design disabled in installer (doublon with ui-ux-pro-max)
- python3 -c moved from deny to ask (unblocks graphify)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
bastien
2026-04-12 14:56:22 +02:00
co-authored by Claude Opus 4.6
parent 0dac12b885
commit 66beae16b7
8 changed files with 264 additions and 93 deletions
+24 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Claude Code statusline — folder, git branch, model, context %
# Claude Code statusline — model, folder, branch, plan, context bar, session start
# Receives JSON on stdin from Claude Code.
INPUT=$(cat)
@@ -18,6 +18,28 @@ if [ -d "$DIR" ]; then
fi
BRANCH_STR="${BRANCH:+ ($BRANCH)}"
# Plan detection (reuse shared lib)
_lib="$(dirname "${BASH_SOURCE[0]}")/../lib/detect-plugins.sh"
if [ -f "$_lib" ]; then
source "$_lib"
PLAN=$(detect_plan 2>/dev/null || echo "pro")
else
PLAN="pro"
fi
PLAN_UPPER=$(echo "$PLAN" | tr '[:lower:]' '[:upper:]' | head -c1)$(echo "$PLAN" | tail -c+2)
# Session duration (from total_duration_ms)
DURATION_MS=$(echo "$INPUT" | jq -r \
'.cost.total_duration_ms // 0' | cut -d. -f1)
DURATION_S=$((DURATION_MS / 1000))
if [ "$DURATION_S" -ge 3600 ]; then
DURATION="$((DURATION_S / 3600))h$((DURATION_S % 3600 / 60))m"
elif [ "$DURATION_S" -ge 60 ]; then
DURATION="$((DURATION_S / 60))m"
else
DURATION="<1m"
fi
# Progress bar (20 chars wide)
WIDTH=20
FILLED=$((PCT * WIDTH / 100))
@@ -45,4 +67,4 @@ fi
RESET="\033[0m"
# Output: single line
echo -e "$MODEL | $FOLDER${BRANCH_STR} | ${COLOR}${BAR}${RESET} ${PCT}%"
echo -e "$MODEL | $FOLDER${BRANCH_STR} | $PLAN_UPPER | ${COLOR}${BAR}${RESET} ${PCT}% | ${DURATION}"