agentleFS
AndrewADevAndrewADev/repo-research/CLAUDE.md

repo-research

CLAUDE.md0 starsChanged 6 months agoApache-2.0View on GitHub

Guidance for Claude Code when working in this repository. A GitHub analysis tool built with LangGraph and a configurable LLM provider (Ollama / Anthropic / HuggingFace). It exposes a set of CLI commands that run predefined analyses over GitHub data, with full conversation persistence via SQLite checkpointing. This project strongly emphasizes type safety. When writing code here you MUST: User prompt → LangGraph orchestrates LLM reasoning + tool calls → GitHub tools execute → results fed back to LLM for…

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    This project strongly emphasizes type safety: When writing code here you MUST:

    line 18
  2. Distinctive:

    Use explicit type hints on all functions, methods, and variables.

    line 20
  3. Distinctive:

    Threads: every run gets a unique thread ID.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

Guidance for Claude Code when working in this repository.

Project

A GitHub analysis tool built with LangGraph and a configurable LLM provider (Ollama / Anthropic / HuggingFace). It exposes a set of CLI commands that run predefined analyses over GitHub data, with full conversation persistence via SQLite checkpointing.

Environment

  • Install: uv sync (add --dev for dev tools)
  • Required env: GITHUB_TOKEN. Provider config (LLM_PROVIDER, ANTHROPIC_API_KEY, etc.) — see the llm-provider-setup skill.
  • CLI: uv run repo-research --help lists all commands and flags. Don't duplicate that surface here.
  • Conversations persist to ~/.repo-research/conversations.db; each run prints a thread ID usable with resume / show.

Code Style and Type Safety

This project strongly emphasizes type safety. When writing code here you MUST:

  • Use explicit type hints on all functions, methods, and variables.
  • Model data with pydantic.BaseModel (or TypedDict) — not raw dict. This applies to API I/O, tool params/results, config, and internal DTOs.
  • Stay compatible with mypy --strict.
  • Validate at system boundaries (external APIs, user input, file I/O) using Pydantic.
from pydantic import BaseModel, Field

class RepositoryAnalysis(BaseModel):
    repo_name: str = Field(..., description="Full repository name (owner/repo)")
    stars: int = Field(ge=0)
    topics: list[str] = Field(default_factory=list)

Core Components

  1. src/repo_research/main.py — Typer CLI entry point; builds the LangGraph, defines analysis prompts, streams responses, manages thread IDs.
  2. src/storage/conversations.py — ConversationStore, SQLite-backed conversation history with thread management.
  3. src/integrations/github/ — GitHub integration:
    • github_client.py — custom HTTP client (not PyGithub) for type safety and reduced deps.
    • tools.py — GitHubTools class wrapping the client.
    • adapter.py — LangGraph integration layer with Pydantic schemas.
    • agent.py — LangGraph state machine config.
    • models.py — Pydantic input models.
    • churn_strategies.py, hotspot_tracker.py — hotspot analysis (see hotspot-analysis skill).
  4. src/core/ — models.py (Prompt types), prompts.py (command prompts: starred_pulse, topic_prompt, hotspot_analysis, run_diagnostic), config.py, llm.py.
  5. src/ui/ — Gradio web UI (app.py, components.py, handlers.py).

Key Design Patterns

  • Tool lifecycle: @with_github_tools decorator ensures cleanup.
  • State: LangGraph manages conversation/tool state with SQLite checkpointing.
  • Threads: every run gets a unique thread ID; resumable via CLI.
  • Strategy pattern: pluggable churn calculations for hotspot analysis.
  • Rate limiting: GitHub client handles backoff on rate limit responses.

Request flow

User prompt → LangGraph orchestrates LLM reasoning + tool calls → GitHub tools execute → results fed back to LLM for synthesis → streamed to user and persisted. Thread IDs let users resume multi-session investigations.

Tests

Live under tests/, mirroring src/ layout. Run with uv run pytest.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.