Skip to content

Add CLAUDE.md documentation for AI-assisted development#15

Merged
groupthinking merged 1 commit intomainfrom
claude/update-claude-md-7ctzk
Jan 28, 2026
Merged

Add CLAUDE.md documentation for AI-assisted development#15
groupthinking merged 1 commit intomainfrom
claude/update-claude-md-7ctzk

Conversation

@groupthinking
Copy link
Owner

Summary

Add comprehensive CLAUDE.md documentation to provide context and guidance for Claude Code when working in the EventRelay repository. This file serves as a quick reference for project structure, development workflows, code standards, and architectural patterns.

Changes

  • New file: CLAUDE.md with 116 lines of structured documentation covering:
    • Project overview (AI-powered video automation platform)
    • Complete repository structure with directory descriptions
    • Common development commands for both Python backend and Next.js frontend
    • Code style guidelines for Python (Black, Ruff, mypy) and TypeScript (ESLint, Tailwind)
    • Testing configuration and markers for pytest
    • Architecture notes (event-driven, dependency injection, MCP integration, multi-provider AI)
    • Key policies (REAL_MODE_ONLY, no secrets in code, security practices, type safety)

Implementation Details

The documentation is organized for quick scanning with:

  • Clear section headers and subsections
  • Code blocks for commands and configuration references
  • Bullet points for easy reference
  • Specific tool versions and configurations (Python 3.9+, Black 88-char, mypy strict mode)
  • Links to configuration files (pyproject.toml, tsconfig.json, etc.)

This enables Claude Code to understand the project context, follow established patterns, and maintain consistency with existing code standards without requiring manual context setup.

https://claude.ai/code/session_01XfMiNNVDB3BmeVBAXoKBvB

Copilot AI review requested due to automatic review settings January 28, 2026 18:40
@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
event-relay-web Error Error Jan 28, 2026 6:40pm
v0-uvai Error Error Jan 28, 2026 6:40pm

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @groupthinking, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a dedicated documentation file, CLAUDE.md, to streamline AI-assisted development within the EventRelay project. By providing a structured and comprehensive overview of the project's architecture, development workflows, and coding standards, this change aims to significantly enhance the efficiency and consistency of AI models like Claude Code when interacting with the codebase.

Highlights

  • New CLAUDE.md Documentation: A new file, CLAUDE.md, has been added to the repository. This document is specifically designed to provide comprehensive context and guidance for AI-assisted development, particularly for tools like Claude Code, when working within the EventRelay repository.
  • Detailed Project Context: The CLAUDE.md file includes a project overview, a detailed breakdown of the repository structure, common development commands for both Python backend and Next.js frontend, established code style guidelines (Python and TypeScript), testing configurations, architectural notes, and key development policies.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@groupthinking groupthinking merged commit 9746f2b into main Jan 28, 2026
13 of 17 checks passed
@groupthinking groupthinking deleted the claude/update-claude-md-7ctzk branch January 28, 2026 18:40
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces CLAUDE.md, a comprehensive documentation file to provide context for AI-assisted development. This is a great initiative to streamline working with AI tools in the repository. The document is well-structured and covers key aspects of the project. My review focuses on a few minor inconsistencies and omissions in the documentation to enhance its accuracy and completeness, ensuring the AI assistant has the most precise context possible.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new CLAUDE.md documentation file intended to provide context for Claude Code when working in the EventRelay repository. The file covers project structure, development commands, code style guidelines, testing configuration, and architectural patterns.

Changes:

  • New documentation file CLAUDE.md with 116 lines covering project overview, repository structure, common commands, code style, testing, architecture notes, and key policies


## Project Overview

EventRelay is an AI-powered video automation platform that transforms YouTube videos into actionable workflows. It captures transcripts, extracts events, dispatches them to MCP (Model Context Protocol) agents, and builds a RAG-based knowledge store. The backend is Python/FastAPI and the frontend is a Next.js/React/TypeScript monorepo.
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description states "the frontend is a Next.js/React/TypeScript monorepo" which is accurate, but throughout the document the actual frontend location is incorrectly referenced. The frontend is located at apps/web/ (Next.js), not in a separate frontend/ directory. This needs to be consistent with the actual repository structure shown in the README.md and the monorepo layout.

Suggested change
EventRelay is an AI-powered video automation platform that transforms YouTube videos into actionable workflows. It captures transcripts, extracts events, dispatches them to MCP (Model Context Protocol) agents, and builds a RAG-based knowledge store. The backend is Python/FastAPI and the frontend is a Next.js/React/TypeScript monorepo.
EventRelay is an AI-powered video automation platform that transforms YouTube videos into actionable workflows. It captures transcripts, extracts events, dispatches them to MCP (Model Context Protocol) agents, and builds a RAG-based knowledge store. The backend is Python/FastAPI, and the repository is a monorepo with a Next.js/React/TypeScript frontend located at `apps/web/`.

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +19
apps/
web/ # Next.js frontend (port 3000)
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repository structure shows web/ as the Next.js frontend location (line 19), but this is incomplete. The full path should be apps/web/ to match the actual monorepo structure. Additionally, line 18 shows apps/ without explaining it's the monorepo apps directory. The structure description should clarify that web/ is inside apps/ and that apps/ contains multiple applications including firebase/, uvai-frontend/, and web/.

Suggested change
apps/
web/ # Next.js frontend (port 3000)
apps/ # Monorepo applications (Next.js and supporting apps)
firebase/ # Firebase-related app/configuration
uvai-frontend/ # Additional frontend application
web/ # Next.js frontend (port 3000) at apps/web/

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +70
# Install all workspace dependencies
npm install

# Build (all workspaces via Turbo)
turbo run build
# or: npm run build

# Dev server
turbo run dev
# or: npm run dev

# Lint
turbo run lint

# Test
turbo run test
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The frontend commands reference a non-existent structure and workflow. The documentation shows standalone turbo run build, turbo run dev, etc., but these commands should be executed from the monorepo root (where they're defined in package.json as npm run build, npm run dev, etc.). Additionally, the frontend is Next.js-based at apps/web/, not a generic frontend, so commands like npm dev --prefix apps/web or working directly in the apps/web directory would be more accurate. The current commands don't match how the monorepo is actually structured or how Turbo is configured.

Suggested change
# Install all workspace dependencies
npm install
# Build (all workspaces via Turbo)
turbo run build
# or: npm run build
# Dev server
turbo run dev
# or: npm run dev
# Lint
turbo run lint
# Test
turbo run test
# Install all workspace dependencies (from monorepo root)
npm install
# Start Next.js dev server for the web app
npm run dev # runs Turbo dev pipeline from monorepo root
# or, scoped directly to the web app:
npm run dev --prefix apps/web
# Build web app (and any dependent packages)
npm run build # runs Turbo build pipeline from monorepo root
# or:
npm run build --prefix apps/web
# Lint
npm run lint # from monorepo root
# or:
npm run lint --prefix apps/web
# Test
npm test --prefix apps/web
# or:
npm run test --prefix apps/web

Copilot uses AI. Check for mistakes.
Comment on lines +92 to +96
- Config: `pyproject.toml` `[tool.pytest.ini_options]`
- `pythonpath = src`, `testpaths = tests`
- Async mode: `asyncio_mode = "auto"`
- Markers: `unit`, `integration`, `slow`, `asyncio`, `database`, `security`, `e2e`, `performance`
- Coverage target: 90% minimum, source: `src/youtube_extension`
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coverage target stated as "90% minimum" is accurate according to pytest.ini (line 17: --cov-fail-under=90), but the coverage source is incorrectly specified. The document states source: src/youtube_extension, but pytest.ini (line 11-13) actually covers backend, enhanced_video_processor, and enterprise_mcp_server, while pyproject.toml covers src/youtube_extension. There's an inconsistency between pytest.ini and pyproject.toml coverage configuration that should be clarified in this documentation.

Suggested change
- Config: `pyproject.toml` `[tool.pytest.ini_options]`
- `pythonpath = src`, `testpaths = tests`
- Async mode: `asyncio_mode = "auto"`
- Markers: `unit`, `integration`, `slow`, `asyncio`, `database`, `security`, `e2e`, `performance`
- Coverage target: 90% minimum, source: `src/youtube_extension`
- Config: `pytest.ini` and `pyproject.toml` (`[tool.pytest.ini_options]`)
- `pythonpath = src`, `testpaths = tests`
- Async mode: `asyncio_mode = "auto"`
- Markers: `unit`, `integration`, `slow`, `asyncio`, `database`, `security`, `e2e`, `performance`
- Coverage: `--cov-fail-under=90` (90% minimum); sources from `pytest.ini` (`backend`, `enhanced_video_processor`, `enterprise_mcp_server`) and from `pyproject.toml` (`src/youtube_extension`)

Copilot uses AI. Check for mistakes.
- Coverage target: 90% minimum, source: `src/youtube_extension`

### Frontend
- Tests in `apps/web/src/components/__tests__/` and `apps/web/src/__tests__/`
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The frontend test path apps/web/src/components/__tests__/ is correct and matches the actual structure, but the documentation should also mention the additional test patterns. According to the apps/web/package.json, tests may follow Next.js conventions, and the README.md mentions tests are also in apps/web/src/__tests__/. Both locations should be documented for completeness.

Copilot uses AI. Check for mistakes.

## Project Overview

EventRelay is an AI-powered video automation platform that transforms YouTube videos into actionable workflows. It captures transcripts, extracts events, dispatches them to MCP (Model Context Protocol) agents, and builds a RAG-based knowledge store. The backend is Python/FastAPI and the frontend is a Next.js/React/TypeScript monorepo.
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section describes the codebase as having a "React frontend" but the frontend is actually Next.js (a React framework), not plain React. This distinction is important because Next.js has specific architectural patterns (server components, app router, API routes, etc.) that differ from a standard React app. The description should clarify "Next.js frontend" instead of just "React frontend" for accuracy. Additionally, there's a discrepancy with the custom coding guidelines which describe it as "FastAPI backend, React frontend" without mentioning Next.js.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +1 to +116
# CLAUDE.md

This file provides context for Claude Code when working in the EventRelay repository.

## Project Overview

EventRelay is an AI-powered video automation platform that transforms YouTube videos into actionable workflows. It captures transcripts, extracts events, dispatches them to MCP (Model Context Protocol) agents, and builds a RAG-based knowledge store. The backend is Python/FastAPI and the frontend is a Next.js/React/TypeScript monorepo.

## Repository Structure

```
src/ # Python backend
youtube_extension/
backend/ # FastAPI app (api/v1/, services/, models/, middleware/)
services/ # Orchestration (agents/, workflows/, ai/)
mcp/ # MCP ecosystem coordinator
main.py # FastAPI entry point
apps/
web/ # Next.js frontend (port 3000)
packages/ # Shared monorepo packages (eslint-config, tsconfig, logger, etc.)
mcp-servers/ # MCP server implementations (litert-mcp, shared-state)
tests/ # Python tests (unit/, integration/, fixtures/, workflows/)
docs/ # Extended documentation
infrastructure/ # Kubernetes manifests, Terraform, database setup
.github/workflows/ # CI/CD (ci.yml, security.yml, deploy-cloud-run.yml, etc.)
```

## Common Commands

### Python Backend

```bash
# Install (editable with dev extras)
pip install -e .[dev,youtube,ml]

# Run backend server
uvicorn src.youtube_extension.main:app --reload --port 8000

# Run tests
pytest tests/ -v
pytest tests/unit/ -v # Unit tests only
pytest tests/ -m "not slow" # Skip slow tests

# Lint and format
ruff check src/ # Lint
ruff check src/ --fix # Auto-fix
black src/ # Format
isort src/ # Sort imports
mypy src/ # Type check
```

### Frontend (Next.js)

```bash
# Install all workspace dependencies
npm install

# Build (all workspaces via Turbo)
turbo run build
# or: npm run build

# Dev server
turbo run dev
# or: npm run dev

# Lint
turbo run lint

# Test
turbo run test
```

## Code Style

### Python
- **Formatter**: Black, 88-char line length
- **Import sorting**: isort (profile: black)
- **Linter**: Ruff (E, W, F, I, B, C4, UP rules; E501 ignored)
- **Type checking**: mypy strict mode (`disallow_untyped_defs = true`)
- Target Python 3.9+
- Config in `pyproject.toml`

### TypeScript/JavaScript
- **Strict mode** TypeScript (`apps/web/tsconfig.json`)
- **ESLint** with Next.js rules (shared config in `packages/eslint-config/`)
- **Tailwind CSS** for styling
- Path alias: `@/*` maps to `src/*`

## Testing

### Python (pytest)
- Config: `pyproject.toml` `[tool.pytest.ini_options]`
- `pythonpath = src`, `testpaths = tests`
- Async mode: `asyncio_mode = "auto"`
- Markers: `unit`, `integration`, `slow`, `asyncio`, `database`, `security`, `e2e`, `performance`
- Coverage target: 90% minimum, source: `src/youtube_extension`

### Frontend
- Tests in `apps/web/src/components/__tests__/` and `apps/web/src/__tests__/`

## Architecture Notes

- **Event-driven**: Events follow `<domain>.<entity>.<action>` naming (e.g. `youtube.video.captured`)
- **Dependency injection**: Service container pattern in `backend/containers/`
- **Multi-provider AI**: Routes to Gemini, OpenAI, Anthropic, or Grok
- **MCP integration**: Agent orchestration via Model Context Protocol
- **Database**: SQLite (dev), PostgreSQL (prod); migrations via Alembic
- **Auth**: NextAuth.js (frontend), python-jose (backend)
- **Monorepo**: Turbo for JS workspaces (`apps/*`, `packages/*`, `mcp-servers/*`)

## Key Policies

- **REAL_MODE_ONLY**: No mock delays, fake data, or simulated responses in production code
- **No secrets in code**: All keys/credentials go in `.env` (gitignored)
- **Security**: Validate inputs via Pydantic; no `dangerouslySetInnerHTML` in React; sanitize subprocess args
- **Type safety enforced**: mypy strict (Python), TypeScript strict (frontend)
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLAUDE.md document contradicts the established custom coding guidelines (CodingGuidelineID: 1000000) in multiple ways. The custom guidelines reference a frontend/ directory extensively and use commands like npm start --prefix frontend, npm test --prefix frontend, etc. However, CLAUDE.md correctly identifies that the frontend is in the monorepo structure but then provides conflicting command examples. The inconsistency between these two documentation files will create confusion. Either the custom guidelines need to be updated to reflect the monorepo structure, or CLAUDE.md should align with the legacy frontend/ references until the custom guidelines are updated.

Copilot generated this review using guidance from repository custom instructions.
- `pythonpath = src`, `testpaths = tests`
- Async mode: `asyncio_mode = "auto"`
- Markers: `unit`, `integration`, `slow`, `asyncio`, `database`, `security`, `e2e`, `performance`
- Coverage target: 90% minimum, source: `src/youtube_extension`
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The custom coding guidelines (CodingGuidelineID: 1000000) specify that the repository should have test coverage greater than 80% for new features, but the CLAUDE.md documentation states 90% minimum. While pytest.ini does enforce 90% (--cov-fail-under=90), this creates a discrepancy with the stated guideline policy. The documentation should either align with the 80% guideline threshold or explicitly note that the actual enforcement is stricter at 90%.

Copilot generated this review using guidance from repository custom instructions.
@groupthinking
Copy link
Owner Author

@copilot open a new pull request to apply changes based on the comments in this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants