Skip to content

chore(claude): add initial Claude.md#3252

Merged
galkleinman merged 3 commits intomainfrom
gk/claude-md
Aug 13, 2025
Merged

chore(claude): add initial Claude.md#3252
galkleinman merged 3 commits intomainfrom
gk/claude-md

Conversation

@galkleinman
Copy link
Copy Markdown
Contributor

@galkleinman galkleinman commented Aug 13, 2025

Important

Adds CLAUDE.md documenting repository structure, package management, testing, semantic conventions, and code quality standards.

  • Documentation:
    • Adds CLAUDE.md with OpenLLMetry Repository Guide.
    • Details repository structure (Nx-managed, multi-package) and package management via Poetry.
    • Explains testing with VCR cassettes, including re-recording flows and API key requirements.
    • References OpenTelemetry GenAI semantic conventions for instrumentation compliance.
    • Clarifies expectation to generate tracing data from instrumentation.
    • Notes code quality standards enforced with Flake8.
    • No changes to code or public APIs.

This description was created by Ellipsis for 3dccef5. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • Documentation
    • Added CLAUDE.md with an OpenLLMetry repository guide.
    • Describes Nx-managed, multi-package structure and Poetry-based package management.
    • Explains testing with VCR cassettes, re-recording flows, and API key needs for new cassettes.
    • References OpenTelemetry GenAI semantic conventions for instrumentation compliance and tracing data.
    • Notes code quality standards enforced with Flake8.
    • No changes to code or public APIs.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 13, 2025

Walkthrough

Added a new documentation file, CLAUDE.md, describing repository layout (Nx), Poetry-based package management, VCR cassette testing and re-recording (requires API keys), adherence to OpenTelemetry GenAI semantic conventions for instrumentation and tracing, and Flake8 linting. No source code or public API changes.

Changes

Cohort / File(s) Summary of Changes
Docs
CLAUDE.md
Added OpenLLMetry Repository Guide detailing Nx project structure, Poetry commands (use poetry run), VCR cassette testing workflow and re-recording process (API keys required), guidance to follow OpenTelemetry GenAI semantic conventions for spans and tracing, and Flake8 code quality enforcement. No code or public API modifications.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I thump my paw on docs so neat,
A carrot-inked guide, concise and sweet.
Nx burrows, Poetry hums,
VCR reels rewind the drums.
Spans hop on OTel trails—🥕🐇

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gk/claude-md

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev Bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to cce2b3e in 38 seconds. Click for details.
  • Reviewed 30 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. CLAUDE.md:23
  • Draft comment:
    Ensure file ends with a newline for consistency.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 30% <= threshold 50% This comment is asking the author to ensure a file ends with a newline, which is a common style guideline but not a critical issue. It doesn't suggest a specific code change or point out a potential bug. It seems more like a style preference.
2. CLAUDE.md:12
  • Draft comment:
    Add examples for re-recording VCR cassettes to aid users.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. CLAUDE.md:16
  • Draft comment:
    Format the external link as clickable markdown for better usability.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. CLAUDE.md:1
  • Draft comment:
    Verify repository naming consistency with 'OpenLLMetry'.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_OyCuJFPYr8IM2vVe

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Comment thread CLAUDE.md Outdated
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Didn't nir change to ruff?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not yet he said

Comment thread CLAUDE.md
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
CLAUDE.md (3)

16-18: Replace bare URL with a Markdown link (fixes markdownlint MD034).

Converting the bare URL to a descriptive link improves readability and satisfies markdownlint.

Apply this diff:

-The semantic convention package follows the OpenTelemetry GenAI specification:
-https://opentelemetry.io/docs/specs/semconv/gen-ai/
+The semantic convention package follows the OpenTelemetry GenAI specification: [OpenTelemetry GenAI semantic conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/).
+

6-11: Add concrete Poetry examples for common workflows.

Quick examples reduce friction for new contributors.

Apply this diff to provide examples:

 ## Package Management
 All packages use Poetry as the package manager. Always execute commands through Poetry:
 ```bash
 poetry run <command>

+Examples:
+bash +# Setup +poetry install + +# Run tests +poetry run pytest + +# Lint +poetry run flake8 +


---

`1-1`: **Confirm file naming and discoverability (CLAUDE.md vs CONTRIBUTING/DEVELOPING).**

If this guide targets all contributors, consider linking it from README or renaming to a more discoverable filename (e.g., CONTRIBUTING.md or DEVELOPING.md). If it’s Claude-specific, add a brief scope note in the intro.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 2708764e20ccfd1bb309406cc6f9a67b89eec3a3 and cce2b3ed4d151ed5065684e70c250002d7339183.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `CLAUDE.md` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

<details>
<summary>CLAUDE.md</summary>

17-17: Bare URL used

(MD034, no-bare-urls)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>CLAUDE.md (1)</summary>

`1-23`: **Solid initial guide. Clear, concise, and actionable.**

Good overview of repo structure, tooling, and expectations. Nice job setting standards early.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment thread CLAUDE.md
Comment thread CLAUDE.md Outdated
Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev Bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 3dccef5 in 54 seconds. Click for details.
  • Reviewed 79 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. CLAUDE.md:6
  • Draft comment:
    Great addition of the Nx Workspace Commands. Consider noting that these commands should be run from the repository root for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. CLAUDE.md:59
  • Draft comment:
    The API key and recording mode guidance is clear. It may help to link to best practices for secure key management or mention .env usage.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. CLAUDE.md:73
  • Draft comment:
    Consider appending a final newline to avoid potential formatting issues.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_IhKXr43TrQ4PxN3x

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@galkleinman galkleinman merged commit 3f0cfab into main Aug 13, 2025
8 checks passed
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
CLAUDE.md (4)

6-27: Nx commands section is solid; consider adding affected graph for quick impact visualization.
Adding nx affected:graph helps developers quickly see dependency impact of changes.

Apply this diff to include it:

 # Show project graph
 nx graph

 # Show what's affected by changes
 nx affected:test
 nx affected:lint
+nx affected:graph

29-33: Clarify first-time setup with Poetry.
Add poetry install so newcomers can get dependencies before using poetry run.

Apply this diff:

 ```bash
-poetry run <command>
+# First-time setup at repo root (or within a specific package)
+poetry install
+# Execute commands through Poetry
+poetry run <command>

---

`35-65`: **Good VCR guidance; include a minimal scrub example to make it actionable.**
A short vcrpy config snippet reduces accidental secret leakage.

Apply this diff to add a brief example:

```diff
 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.
 
+Example (vcrpy via pytest-recording; place in conftest.py or a helper):
+```python
+import vcr
+
+vcr_config = vcr.VCR(
+    # Strip or mask secrets
+    filter_headers=["authorization", "x-api-key", "authorization-bearer"],
+    filter_query_parameters=["api_key", "key", "token"],
+)
+```

66-69: Fix markdownlint MD034: convert bare URL to a Markdown link.
Resolves no-bare-urls warning and improves readability.

Apply this diff:

-## Semantic Conventions
-The semantic convention package follows the OpenTelemetry GenAI specification:
-https://opentelemetry.io/docs/specs/semconv/gen-ai/
+## Semantic Conventions
+The semantic convention package follows the [OpenTelemetry GenAI specification](https://opentelemetry.io/docs/specs/semconv/gen-ai/).
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cce2b3e and 3dccef5.

📒 Files selected for processing (1)
  • CLAUDE.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
CLAUDE.md

68-68: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (2)
CLAUDE.md (2)

73-74: LGTM: corrected statement about Flake8.
Accurately states Flake8 is used for linting (not formatting). Matches prior feedback.


14-15: Confirmed: All projects define the “lock” target
A recursive search across every project.json under packages/ showed a targets.lock entry in each one. The nx run-many -t lock command will therefore work as documented—no changes needed.

Comment thread CLAUDE.md
Comment on lines +43 to +54
# 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Ensure pytest supports --record-mode flags (pytest-recording/pytest-vcr).
These flags are provided by plugins; verify the repo includes one of them so commands work.

Run this script to check for relevant plugins/deps and pytest config:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Searching for pytest VCR plugins and config..."
rg -n "pytest-recording|pytest-vcr|vcrpy" -S || true

echo "Looking for pytest configuration files..."
fd -t f -a "pyproject.toml|pytest.ini|tox.ini|setup.cfg" | while read -r f; do
  echo "== $f =="
  rg -n "record-mode|addopts|pytest_plugins|vcr" "$f" || true
done

echo "Listing pyproject poetry dependencies mentioning pytest/vcr..."
fd pyproject.toml | xargs -I{} sh -c 'echo "-> {}"; rg -n "pytest|vcr|recording" "{}" || true'

Length of output: 311274


Ensure the root project installs and enables a pytest recording plugin

It looks like only individual packages list pytest‐recording and vcrpy, but your top-level README commands run pytest … --record-mode=… from the repo root. You’ll need to add and configure one of these plugins in your root environment so those flags are recognized:

• In your root pyproject.toml (under [tool.poetry.dev-dependencies]), add:
‑ pytest-recording = "^0.13.1"
‑ vcrpy = "^7.0.0"

• Run:
poetry add --dev pytest-recording vcrpy

• Create or update pytest.ini (at the repo root) with:

[pytest]
addopts = --record-mode=all
pytest_plugins =
    pytest_recording

• Commit those changes and confirm:
poetry run pytest tests/ --record-mode=all now picks up the plugin.

🤖 Prompt for AI Agents
In CLAUDE.md around lines 43 to 54, the README commands assume pytest recording
flags are available at the repo root but the root environment lacks
pytest-recording/vcrpy; add dev dependencies for pytest-recording and vcrpy to
the root pyproject.toml (under [tool.poetry.dev-dependencies]) or run poetry add
--dev pytest-recording vcrpy, create/update a pytest.ini at the repo root to
enable the plugin (addopts and pytest_plugins including pytest_recording), and
commit those changes so running the documented poetry run pytest tests/
--record-mode=all from the repo root recognizes the flags.

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.

3 participants