Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 0 additions & 105 deletions .claude-plugin/agents/context-linker.md

This file was deleted.

98 changes: 0 additions & 98 deletions .claude-plugin/agents/fizzy-navigator.md

This file was deleted.

13 changes: 0 additions & 13 deletions .claude-plugin/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"description": "fizzy hooks for Fizzy integration",
"hooks": {
"SessionStart": [
{
Expand All @@ -11,18 +10,6 @@
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-commit-check.sh",
"timeout": 5
}
]
}
]
}
}
61 changes: 0 additions & 61 deletions .claude-plugin/hooks/post-commit-check.sh

This file was deleted.

83 changes: 25 additions & 58 deletions .claude-plugin/hooks/session-start.sh
Original file line number Diff line number Diff line change
@@ -1,81 +1,48 @@
#!/usr/bin/env bash
# session-start.sh - Load Fizzy context at session start
# session-start.sh - Fizzy plugin liveness check
#
# This hook runs when Claude Code starts a session and outputs
# relevant Fizzy board context if configured.
# Lightweight: one subprocess call. Context priming happens on first
# use via the /fizzy skill, not here.

set -euo pipefail

# Require jq for JSON parsing
if ! command -v jq &>/dev/null; then
exit 0
fi

# Find fizzy - prefer PATH, fall back to plugin's bin directory
if command -v fizzy &>/dev/null; then
FIZZY_BIN="fizzy"
else
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FIZZY_BIN="${SCRIPT_DIR}/../../bin/fizzy"
if [[ ! -x "$FIZZY_BIN" ]]; then
cat << 'EOF'
if ! command -v fizzy &>/dev/null; then
cat << 'EOF'
<hook-output>
Fizzy plugin: fizzy CLI not found.
Install: https://github.com/basecamp/fizzy-cli#quick-start
Fizzy plugin active — CLI not found on PATH.
Install: https://github.com/basecamp/fizzy-cli#installation
</hook-output>
EOF
exit 0
fi
exit 0
fi

# Get CLI version
cli_version=$("$FIZZY_BIN" version 2>/dev/null | jq -r '.data.version // empty' 2>/dev/null || true)
auth_json=$(fizzy auth status --json 2>/dev/null || echo '{}')

# Check if authenticated
auth_output=$("$FIZZY_BIN" auth status 2>/dev/null || echo '{}')
is_auth=$(echo "$auth_output" | jq -r '.data.authenticated // false')
account=$(echo "$auth_output" | jq -r '.data.account // empty')

if [[ "$is_auth" != "true" ]]; then
if ! command -v jq &>/dev/null; then
cat << 'EOF'
<hook-output>
Fizzy plugin: Not authenticated.
Run: fizzy setup
Fizzy plugin active.
</hook-output>
EOF
exit 0
fi

# Build context message
context="Fizzy context loaded:"

if [[ -n "$cli_version" ]]; then
context+="\n CLI: ${cli_version}"
fi

if [[ -n "$account" ]]; then
context+="\n Account: $account"
is_auth=false
if parsed_auth=$(echo "$auth_json" | jq -er '.data.authenticated' 2>/dev/null); then
is_auth="$parsed_auth"
fi

# Check for local .fizzy.yaml board config
if command -v yq &>/dev/null; then
local_board=$(yq -r '.board // empty' .fizzy.yaml 2>/dev/null || true)
elif command -v python3 &>/dev/null; then
local_board=$(python3 -c "import yaml,sys; d=yaml.safe_load(open('.fizzy.yaml')); print(d.get('board',''))" 2>/dev/null || true)
fi

if [[ -n "${local_board:-}" ]]; then
context+="\n Board: $local_board (from .fizzy.yaml)"
fi

cat << EOF
if [[ "$is_auth" == "true" ]]; then
cat << 'EOF'
<hook-output>
$(echo -e "$context")

Use \`fizzy\` commands to interact with Fizzy:
fizzy board list # List boards
fizzy card list # List cards on default board
fizzy search "query" # Search across cards
fizzy card show <number> # Show card details
Fizzy plugin active.
</hook-output>
EOF
else
cat << 'EOF'
<hook-output>
Fizzy plugin active — not authenticated.
Run: fizzy setup
</hook-output>
EOF
fi
Loading
Loading