diff --git a/.claude-plugin/commands/doctor.md b/.claude-plugin/commands/doctor.md deleted file mode 100644 index 0ec041f2..00000000 --- a/.claude-plugin/commands/doctor.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: basecamp-doctor -description: Check Basecamp plugin health — CLI, auth, API connectivity, project context. -invocable: true ---- - -# /basecamp-doctor - -Run the Basecamp CLI health check and report results. - -```bash -basecamp doctor --json -``` - -Interpret the output: -- **pass**: Working correctly -- **warn**: Non-critical issue (e.g., shell completion not installed) -- **skip**: Check not run (e.g., unauthenticated or not applicable) -- **fail**: Broken — needs attention - -For any failures, follow the `hint` field in the check output. Common fixes: -- Authentication failed → `basecamp auth login` -- API unreachable → check network / VPN -- Plugin not installed → `claude plugin install basecamp` - -Report results concisely: list failures and warnings with their hints. If everything passes, say so. diff --git a/.claude-plugin/hooks/hooks.json b/.claude-plugin/hooks/hooks.json deleted file mode 100644 index 5a5e3e63..00000000 --- a/.claude-plugin/hooks/hooks.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "description": "basecamp hooks for Basecamp integration", - "hooks": { - "SessionStart": [ - { - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh", - "timeout": 5 - } - ] - } - ], - "PostToolUse": [ - { - "matcher": "Bash", - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/hooks/post-commit-check.sh", - "timeout": 5 - } - ] - } - ] - } -} diff --git a/.claude-plugin/hooks/post-commit-check.sh b/.claude-plugin/hooks/post-commit-check.sh deleted file mode 100755 index fff986dc..00000000 --- a/.claude-plugin/hooks/post-commit-check.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash -# post-commit-check.sh - Check for Basecamp todo references after git commits -# -# This hook runs after Bash tool use and checks if a git commit was made -# that references a Basecamp todo (BC-12345, todo-12345, etc.) - -set -euo pipefail - -# Read tool input from stdin (JSON with tool_name, tool_input, tool_output) -input=$(cat) - -# Extract tool input (the bash command that was run) -tool_input=$(echo "$input" | jq -r '.tool_input.command // empty' 2>/dev/null) - -# Only process git commit commands -if [[ ! "$tool_input" =~ ^git\ commit ]]; then - exit 0 -fi - -# Check if commit succeeded by looking for output patterns -tool_output=$(echo "$input" | jq -r '.tool_output // empty' 2>/dev/null) - -# Skip if commit failed — detect error indicators before checking for success. -# Only match lines that look like git/hook errors, not commit subject lines -# (e.g. "[branch abc1234] Fix failed login" should not trigger this guard). -# We strip the "[branch hash] subject" success line before scanning for errors. -filtered_output=$(echo "$tool_output" | grep -v '^\[.*[a-f0-9]\{7,\}\]') -if echo "$filtered_output" | grep -qiE '(^|[[:space:]])(error|fatal|aborted|rejected)[[:space:]:]|hook[[:space:]].*[[:space:]]failed|pre-commit[[:space:]].*[[:space:]]failed|^error:'; then - exit 0 -fi - -# Verify commit actually succeeded - look for commit hash pattern or "create mode" -if [[ ! "$tool_output" =~ \[.*[a-f0-9]{7,}\] ]] && [[ ! "$tool_output" =~ "create mode" ]]; then - exit 0 -fi - -# Look for todo references in the commit message or branch name -branch=$(git branch --show-current 2>/dev/null || true) -last_commit_msg=$(git log -1 --format=%s 2>/dev/null || true) - -# Patterns: BC-12345, todo-12345, basecamp-12345 -todo_patterns='BC-[0-9]+|todo-[0-9]+|basecamp-[0-9]+' - -found_in_branch=$(echo "$branch" | grep -oEi "$todo_patterns" | head -1 || true) -found_in_msg=$(echo "$last_commit_msg" | grep -oEi "$todo_patterns" | head -1 || true) - -if [[ -n "$found_in_branch" ]] || [[ -n "$found_in_msg" ]]; then - ref="${found_in_msg:-$found_in_branch}" - # Extract just the number - todo_id=$(echo "$ref" | grep -oE '[0-9]+') - - cat << EOF - -Detected Basecamp todo reference: $ref - -To link this commit to Basecamp: - basecamp comments create $todo_id "Commit $(git rev-parse --short HEAD 2>/dev/null): $last_commit_msg" - -Or complete the todo: - basecamp todos complete $todo_id - -EOF -fi diff --git a/.claude-plugin/hooks/session-start.sh b/.claude-plugin/hooks/session-start.sh deleted file mode 100755 index 306dc607..00000000 --- a/.claude-plugin/hooks/session-start.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash -# session-start.sh - Basecamp plugin liveness check -# -# Lightweight: one subprocess call. Confirms the CLI is available and, -# when jq is installed, whether it is authenticated. Context priming -# (project IDs, etc.) happens on first use via the /basecamp skill, -# not here. - -set -euo pipefail - -if ! command -v basecamp &>/dev/null; then - cat << 'EOF' - -Basecamp plugin active — CLI not found on PATH. -Install: https://github.com/basecamp/basecamp-cli#installation - -EOF - exit 0 -fi - -# Single subprocess: auth status tells us if we're good to go -auth_json=$(basecamp auth status --json 2>/dev/null || echo '{}') - -if ! command -v jq &>/dev/null; then - # No jq — can't parse, just confirm presence - cat << 'EOF' - -Basecamp plugin active. - -EOF - exit 0 -fi - -is_auth=false -if parsed_auth=$(echo "$auth_json" | jq -er '.data.authenticated' 2>/dev/null); then - is_auth="$parsed_auth" -fi - -if [[ "$is_auth" == "true" ]]; then - cat << 'EOF' - -Basecamp plugin active. - -EOF -else - cat << 'EOF' - -Basecamp plugin active — not authenticated. -Run: basecamp auth login - -EOF -fi diff --git a/.claude-plugin/skills/basecamp b/.claude-plugin/skills/basecamp deleted file mode 120000 index 57c945a0..00000000 --- a/.claude-plugin/skills/basecamp +++ /dev/null @@ -1 +0,0 @@ -../../skills/basecamp \ No newline at end of file