An agentic skills framework & software development methodology that works.
Move 'skills behind' warning to end of session start output
Jesse Vincentd1f42e546208
diff --git a/hooks/session-start.sh b/hooks/session-start.shindex 22f4fbbcb..72ab7c3d4 100755--- a/hooks/session-start.sh+++ b/hooks/session-start.sh@@ -6,11 +6,17 @@ set -euo pipefail# Set SUPERPOWERS_SKILLS_ROOT environment variableexport SUPERPOWERS_SKILLS_ROOT="${HOME}/.config/superpowers/skills"-# Run skills initialization script (handles clone/fetch/notification)+# Run skills initialization script (handles clone/fetch/auto-update)SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"init_output=$("${PLUGIN_ROOT}/lib/initialize-skills.sh" 2>&1 || echo "")+# Extract status flags+skills_updated=$(echo "$init_output" | grep "SKILLS_UPDATED=true" || echo "")+skills_behind=$(echo "$init_output" | grep "SKILLS_BEHIND=true" || echo "")+# Remove status flags from display output+init_output=$(echo "$init_output" | grep -v "SKILLS_UPDATED=true" | grep -v "SKILLS_BEHIND=true")+# Run find-skills to show all available skillsfind_skills_output=$("${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/find-skills" 2>&1 || echo "Error running find-skills")@@ -28,12 +34,18 @@ if [ -n "$init_escaped" ]; theninit_message="${init_escaped}\n\n"fi+# Build status messages that go at the end+status_message=""+if [ -n "$skills_behind" ]; then+ status_message="\n\n⚠️ New skills available from upstream. Ask me to use the pulling-updates-from-skills-repository skill."+fi+# Output context injection as JSONcat <<EOF{"hookSpecificOutput": {"hookEventName": "SessionStart",- "additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n${init_message}**The content below is from skills/using-skills/SKILL.md - your introduction to using skills:**\n\n${using_skills_escaped}\n\n**Tool paths (use these when you need to search for or run skills):**\n- find-skills: ${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/find-skills\n- skill-run: ${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/skill-run\n\n**Skills live in:** ${SUPERPOWERS_SKILLS_ROOT}/skills/ (you work on your own branch and can edit any skill)\n\n**Available skills (output of find-skills):**\n\n${find_skills_escaped}\n</EXTREMELY_IMPORTANT>"+ "additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n${init_message}**The content below is from skills/using-skills/SKILL.md - your introduction to using skills:**\n\n${using_skills_escaped}\n\n**Tool paths (use these when you need to search for or run skills):**\n- find-skills: ${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/find-skills\n- skill-run: ${SUPERPOWERS_SKILLS_ROOT}/skills/using-skills/skill-run\n\n**Skills live in:** ${SUPERPOWERS_SKILLS_ROOT}/skills/ (you work on your own branch and can edit any skill)\n\n**Available skills (output of find-skills):**\n\n${find_skills_escaped}${status_message}\n</EXTREMELY_IMPORTANT>"}}EOF