From 5b8cc3446fa1f4580e2b331ea04f630ea64deb4f Mon Sep 17 00:00:00 2001 From: Keysat Date: Fri, 12 Jun 2026 23:04:06 -0500 Subject: [PATCH] Add /handoff ritual reminder to status line --- adapters/claude/statusline.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/adapters/claude/statusline.sh b/adapters/claude/statusline.sh index d7c0661..f04c195 100755 --- a/adapters/claude/statusline.sh +++ b/adapters/claude/statusline.sh @@ -53,12 +53,26 @@ if [ -n "$transcript" ] && [ -r "$transcript" ] && command -v jq >/dev/null 2>&1 fi fi +# 5. Handoff-ritual reminder. Green once /handoff has been invoked this session, +# red until then — a nudge to run the session-close ritual (update AGENTS.md, +# commit, push). Detected from the transcript: the slash-command marker the +# harness writes when /handoff is typed, or the Skill-tool form when it is +# invoked programmatically. Note this detects invocation, not completion. +handoff=$(printf '\033[31m/handoff NOT RUN YET\033[0m') +if [ -n "$transcript" ] && [ -r "$transcript" ] && command -v grep >/dev/null 2>&1; then + if grep -qF -e '/handoff' \ + -e '"name":"Skill","input":{"skill":"handoff"}' "$transcript" 2>/dev/null; then + handoff=$(printf '\033[32m/handoff successfully run\033[0m') + fi +fi + # Assemble the line, separating non-empty segments with " | " parts=() -[ -n "$cwd" ] && parts+=("$cwd") -[ -n "$branch" ] && parts+=("$branch") -[ -n "$model" ] && parts+=("$model") -[ -n "$ctx" ] && parts+=("$ctx") +[ -n "$cwd" ] && parts+=("$cwd") +[ -n "$branch" ] && parts+=("$branch") +[ -n "$model" ] && parts+=("$model") +[ -n "$ctx" ] && parts+=("$ctx") +[ -n "$handoff" ] && parts+=("$handoff") joined="" for part in "${parts[@]}"; do