From cce2b3ed4d151ed5065684e70c250002d7339183 Mon Sep 17 00:00:00 2001 From: Gal Kleinman Date: Wed, 13 Aug 2025 11:11:40 +0300 Subject: [PATCH 1/2] chore(claude): add initial Claude.md --- CLAUDE.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000000..5ec5164b7f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,23 @@ +# OpenLLMetry Repository Guide + +## Repository Structure +This repository contains multiple PyPI-publishable packages organized and orchestrated using Nx workspace management. + +## Package Management +All packages use Poetry as the package manager. Always execute commands through Poetry: +```bash +poetry run +``` + +## Testing with VCR Cassettes +Tests utilize recordings/cassettes for API calls. When making changes that affect API interactions, re-record VCR cassettes to ensure test accuracy. Creating new cassettes typically requires API keys (OpenAI, Anthropic, etc.) - request these from the user when needed. + +## Semantic Conventions +The semantic convention package follows the OpenTelemetry GenAI specification: +https://opentelemetry.io/docs/specs/semconv/gen-ai/ + +## Instrumentation Packages +Instrumentation packages should leverage the semantic conventions package. Their purpose is to instrument AI-related libraries and generate spans and tracing data compliant with OpenTelemetry semantic conventions. + +## Code Quality +Flake8 is used for code linting and formatting. \ No newline at end of file From 3dccef5b996dfac319b991384b04c59d63640eb2 Mon Sep 17 00:00:00 2001 From: Gal Kleinman Date: Wed, 13 Aug 2025 11:26:50 +0300 Subject: [PATCH 2/2] fix pr comments --- CLAUDE.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 5ec5164b7f..837057b821 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -3,6 +3,29 @@ ## Repository Structure This repository contains multiple PyPI-publishable packages organized and orchestrated using Nx workspace management. +### Nx Workspace Commands +```bash +# Run tests across all packages +nx run-many -t test + +# Run linting across all packages +nx run-many -t lint + +# Update lock files across all packages +nx run-many -t lock + +# Run specific targets on specific packages +nx run :test +nx run :lint + +# Show project graph +nx graph + +# Show what's affected by changes +nx affected:test +nx affected:lint +``` + ## Package Management All packages use Poetry as the package manager. Always execute commands through Poetry: ```bash @@ -10,7 +33,35 @@ poetry run ``` ## Testing with VCR Cassettes -Tests utilize recordings/cassettes for API calls. When making changes that affect API interactions, re-record VCR cassettes to ensure test accuracy. Creating new cassettes typically requires API keys (OpenAI, Anthropic, etc.) - request these from the user when needed. +Tests utilize VCR cassettes for API calls. + +### Commands +```bash +# Run tests normally (uses existing cassettes) +poetry run pytest tests/ + +# Re-record all cassettes (requires API keys) +poetry run pytest tests/ --record-mode=all + +# Record only new test episodes +poetry run pytest tests/ --record-mode=new_episodes + +# Record cassettes once (if they don't exist) +poetry run pytest tests/ --record-mode=once + +# Run tests without recording (fails if cassettes missing) +poetry run pytest tests/ --record-mode=none + +# Run specific test files +poetry run pytest tests/test_agents.py --record-mode=once +``` + +### Guidance +Re-record cassettes when API interactions change to ensure test accuracy. +Never commit secrets or PII. Scrub them using VCR filters (e.g., filter_headers, before_record) or your test framework's equivalent. +Store API keys only in environment variables/secure vaults; never in code or cassettes. +Typical record modes you may use: once, new_episodes, all, none (choose per test needs). +Creating new cassettes requires valid API keys (OpenAI, Anthropic, etc.); ask the user to provide them if needed. ## Semantic Conventions The semantic convention package follows the OpenTelemetry GenAI specification: @@ -20,4 +71,4 @@ https://opentelemetry.io/docs/specs/semconv/gen-ai/ Instrumentation packages should leverage the semantic conventions package. Their purpose is to instrument AI-related libraries and generate spans and tracing data compliant with OpenTelemetry semantic conventions. ## Code Quality -Flake8 is used for code linting and formatting. \ No newline at end of file +Flake8 is used for code linting. \ No newline at end of file