diff --git a/.mcp.json b/.mcp.json deleted file mode 100644 index 5443e91..0000000 --- a/.mcp.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "mcpServers": { - "Gmail": { - "type": "http", - "url": "https://gmail.mcp.claude.com/mcp" - }, - "Google Calendar": { - "type": "http", - "url": "https://gcal.mcp.claude.com/mcp" - } - } -} diff --git a/CLAUDE.md b/DISPATCHER.md similarity index 100% rename from CLAUDE.md rename to DISPATCHER.md diff --git a/agents/architect.md b/agents/architect.md old mode 100644 new mode 100755 index 3e64eac..39455c5 --- a/agents/architect.md +++ b/agents/architect.md @@ -17,7 +17,8 @@ description: > JA: "新しいプロジェクト". Also trigger when a new topic/project/area emerges that needs a home, or when another agent reports a missing structure. -tools: Read, Write, Edit, Bash, Glob, Grep +mode: subagent +capabilities: [read, write, edit, bash] model: opus --- diff --git a/agents/connector.md b/agents/connector.md old mode 100644 new mode 100755 index 2741337..fc87a61 --- a/agents/connector.md +++ b/agents/connector.md @@ -14,7 +14,8 @@ description: > "verbinde die Notizen", "finde Verbindungen", "Graphanalyse", "fehlende Links", "conecta as notas", "encontra conexões", "análise do grafo", "links em falta", or after a large batch of notes has been filed and needs cross-linking. -tools: Read, Edit, Glob, Grep +mode: subagent +capabilities: [read, edit] model: sonnet --- diff --git a/agents/librarian.md b/agents/librarian.md old mode 100644 new mode 100755 index 081ed4f..8c22280 --- a/agents/librarian.md +++ b/agents/librarian.md @@ -15,7 +15,8 @@ description: > "wöchentliche Überprüfung", "Vault prüfen", "Wartung", "Vault aufräumen", "revisão semanal", "verifica o vault", "manutenção", "limpeza do vault", or when the user suspects broken links, misplaced files, or structural problems. -tools: Read, Write, Edit, Bash, Glob, Grep +mode: subagent +capabilities: [read, write, edit, bash] model: opus --- diff --git a/agents/postman.md b/agents/postman.md old mode 100644 new mode 100755 index 8beaf4e..b0df2fc --- a/agents/postman.md +++ b/agents/postman.md @@ -25,7 +25,8 @@ description: > PT: "verificar meus emails", "o que tem na caixa de entrada", "importar eventos", "criar evento", "o que tem no calendário", "triagem de email", "preparar a reunião", "agenda semanal", "rascunho de resposta". -tools: Read, Write, Edit, Glob, Grep, Bash +mode: subagent +capabilities: [read, write, edit, bash] model: sonnet --- diff --git a/agents/scribe.md b/agents/scribe.md old mode 100644 new mode 100755 index 27bacc2..da487aa --- a/agents/scribe.md +++ b/agents/scribe.md @@ -12,7 +12,8 @@ description: > "salva isso", "nota rápida", "escreve isso", "lembra-me que", or when the user pastes messy, unformatted text, speech-to-text output, or a chain of related thoughts that need to be turned into proper notes. -tools: Read, Write, Edit, Glob, Grep +mode: subagent +capabilities: [read, write, edit] model: sonnet --- diff --git a/agents/seeker.md b/agents/seeker.md old mode 100644 new mode 100755 index 94d2288..3d1e3d7 --- a/agents/seeker.md +++ b/agents/seeker.md @@ -14,7 +14,8 @@ description: > "such im Vault", "finde", "wo habe ich", "zeig mir", "procura no vault", "encontra", "onde coloquei", "mostra-me", or any question that requires looking up existing vault content. -tools: Read, Glob, Grep +mode: subagent +capabilities: [read] model: sonnet --- diff --git a/agents/sorter.md b/agents/sorter.md old mode 100644 new mode 100755 index 6f07532..3aebec4 --- a/agents/sorter.md +++ b/agents/sorter.md @@ -10,7 +10,8 @@ description: > "sortiere den Eingang", "Notizen sortieren", "organiza a caixa de entrada", "triagem", or when the Inbox has accumulated notes that need filing. -tools: Read, Write, Edit, Glob, Grep, Bash +mode: subagent +capabilities: [read, write, edit, bash] model: sonnet --- diff --git a/agents/transcriber.md b/agents/transcriber.md old mode 100644 new mode 100755 index bb18fa5..cfa5a61 --- a/agents/transcriber.md +++ b/agents/transcriber.md @@ -17,7 +17,8 @@ description: > PT: "transcrever", "notas de reunião", "resumo do podcast", "notas de aula", "diário de voz", "resumo da chamada". Also triggers when the user uploads an audio file (mp3, m4a, wav) or pastes a raw transcript. -tools: Read, Write, Glob, Grep +mode: subagent +capabilities: [read, write] model: sonnet --- diff --git a/hooks/notify.hook.yaml b/hooks/notify.hook.yaml new file mode 100755 index 0000000..310de99 --- /dev/null +++ b/hooks/notify.hook.yaml @@ -0,0 +1,6 @@ +name: notify +description: Send a desktop notification when Claude Code needs attention +script: notify.sh +triggers: + - event: on-notification +exclude: [] diff --git a/hooks/notify.sh b/hooks/notify.sh index 202e20e..29005dd 100755 --- a/hooks/notify.sh +++ b/hooks/notify.sh @@ -10,8 +10,8 @@ # ============================================================================= INPUT=$(cat) -TITLE=$(echo "$INPUT" | jq -r '.title // "Second Brain Crew"' 2>/dev/null) -MESSAGE=$(echo "$INPUT" | jq -r '.message // "Claude needs your attention"' 2>/dev/null) +TITLE=$(echo "$INPUT" | jq -r '.args.title // "Second Brain Crew"' 2>/dev/null) +MESSAGE=$(echo "$INPUT" | jq -r '.args.message // "Claude needs your attention"' 2>/dev/null) if [[ "$(uname)" == "Darwin" ]]; then osascript -e "display notification \"$MESSAGE\" with title \"$TITLE\"" 2>/dev/null diff --git a/hooks/protect-system-files.hook.yaml b/hooks/protect-system-files.hook.yaml new file mode 100755 index 0000000..7f38b18 --- /dev/null +++ b/hooks/protect-system-files.hook.yaml @@ -0,0 +1,7 @@ +name: protect-system-files +description: Block edits to core crew files at runtime +script: protect-system-files.sh +triggers: + - event: before-tool-use + match-tool: [edit, write] +exclude: [] diff --git a/hooks/protect-system-files.sh b/hooks/protect-system-files.sh index ea43066..ad59c17 100755 --- a/hooks/protect-system-files.sh +++ b/hooks/protect-system-files.sh @@ -12,7 +12,7 @@ # ============================================================================= INPUT=$(cat) -FILE=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.command // ""' 2>/dev/null) +FILE=$(echo "$INPUT" | jq -r '.args.file_path // .args.command // ""' 2>/dev/null) # If we can't extract a file path, allow the operation [[ -z "$FILE" ]] && exit 0 diff --git a/hooks/validate-frontmatter.hook.yaml b/hooks/validate-frontmatter.hook.yaml new file mode 100755 index 0000000..439d9c4 --- /dev/null +++ b/hooks/validate-frontmatter.hook.yaml @@ -0,0 +1,7 @@ +name: validate-frontmatter +description: Warn on broken YAML frontmatter after writing .md files +script: validate-frontmatter.sh +triggers: + - event: after-tool-use + match-tool: [write] +exclude: [] diff --git a/hooks/validate-frontmatter.sh b/hooks/validate-frontmatter.sh index 91087a5..9984d84 100755 --- a/hooks/validate-frontmatter.sh +++ b/hooks/validate-frontmatter.sh @@ -17,7 +17,7 @@ # ============================================================================= INPUT=$(cat) -FILE=$(echo "$INPUT" | jq -r '.tool_input.file_path // ""' 2>/dev/null) +FILE=$(echo "$INPUT" | jq -r '.args.file_path // ""' 2>/dev/null) # Skip if we can't extract a path [[ -z "$FILE" ]] && exit 0 diff --git a/mcp/servers.yaml b/mcp/servers.yaml new file mode 100755 index 0000000..fb5a463 --- /dev/null +++ b/mcp/servers.yaml @@ -0,0 +1,11 @@ +servers: + - name: Gmail + type: http + url: "https://gmail.mcp.claude.com/mcp" + env: {} + exclude: [] + - name: Google Calendar + type: http + url: "https://gcal.mcp.claude.com/mcp" + env: {} + exclude: [] diff --git a/scripts/launchme.sh b/scripts/launchme.sh index 64ab4c5..7d248d6 100755 --- a/scripts/launchme.sh +++ b/scripts/launchme.sh @@ -134,7 +134,7 @@ fi install_settings "$REPO_DIR/settings.json" "$VAULT_DIR/.claude" -install_claude_md "$REPO_DIR/CLAUDE.md" "$VAULT_DIR" +install_claude_md "$REPO_DIR/DISPATCHER.md" "$VAULT_DIR" # ── MCP servers (Gmail + Calendar) ─────────────────────────────────────────── echo "" diff --git a/scripts/lib.sh b/scripts/lib.sh index 5f504aa..c26ff53 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -399,6 +399,7 @@ install_settings() { } # install_claude_md +# Copies DISPATCHER.md (src) to vault_dir/CLAUDE.md. # Sets _LAST_CHANGED. install_claude_md() { local src="$1" vault_dir="$2" diff --git a/scripts/updateme.sh b/scripts/updateme.sh index 49b8426..a75ef93 100755 --- a/scripts/updateme.sh +++ b/scripts/updateme.sh @@ -60,7 +60,7 @@ HOOK_COUNT=$(install_hooks "$REPO_DIR/hooks" "$VAULT_DIR/.claude/hooks") install_settings "$REPO_DIR/settings.json" "$VAULT_DIR/.claude" SETTINGS_CHANGED=$_LAST_CHANGED -install_claude_md "$REPO_DIR/CLAUDE.md" "$VAULT_DIR" +install_claude_md "$REPO_DIR/DISPATCHER.md" "$VAULT_DIR" CLAUDE_MD_CHANGED=$_LAST_CHANGED # ── Summary ───────────────────────────────────────────────────────────────────