This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Shepherd is a Community Management Agent that uses the Embabel Agent framework to help manage GitHub developer communities. It monitors GitHub repositories for new issues, analyzes them using AI (Utility AI pattern), and can research the people who raise issues.
# Build the project
./mvnw compile
# Run tests
./mvnw test
# Run a single test class
./mvnw test -Dtest=RepoIdTest
# Run a single test method
./mvnw test -Dtest=RepoIdTest#testFromUrl
# Run the application in interactive shell mode
./scripts/shell.sh
# Run an MCP server exposing tools over SSE
./scripts/mcp_server.shOPENAI_API_KEY- Required for LLM functionalityGITHUB_PERSONAL_ACCESS_TOKEN- Optional but recommended to avoid rate limiting; without it the application may hang
Built on Embabel Agent (embabel-agent-starter) - a Kotlin/Spring Boot framework for building AI agents. Uses OpenAI by default (can switch to Anthropic by uncommenting dependency in pom.xml).
Domain Layer (com.embabel.shepherd.domain)
Issue/RaisableIssue- GitHub issue representations with person relationshipsPerson/Profile- User information and AI-researched profilesEmployer- Company associations
Agent Actions (com.embabel.shepherd.agent.IssueActions)
@Actionannotated methods that form the Utility AI workflowsaveNewIssue- Stores new issues, skips known onesreactToNewIssue- Generates AI first response with urgency/sentiment analysisresearchRaiser- Researches unknown issue authors using web tools
Services (com.embabel.shepherd.service)
IssueReader- Fetches issues from GitHub via kohsuke/github-apiStore- Persistence layer usingMixinTemplate(Drivine-based)
Configuration (com.embabel.shepherd.conf)
ShepherdProperties- Type-safe configuration for LLM options, repository list, profile categories
- Shell command triggers issue scan for configured repositories
- New issues are saved to Neo4j, existing ones skipped
- AI generates response analyzing urgency and sentiment
- Unknown issue raisers are researched via web tools
Located in src/main/resources/prompts/ with .jinja extension:
first_response.jinja- Template for initial issue responseresearch_person.jinja- Template for researching issue authors
Neo4j graph database for storing issues, people, and relationships. Test containers used for integration tests.
- Utility AI: Actions are scored and selected based on utility rather than explicit workflow
- SpEL Preconditions:
@Action(pre = ["spel:..."])for conditional action execution - Delegation pattern:
Issue by selfin Kotlin for interface delegation