Add AGENTS.md - #39
Conversation
📝 WalkthroughWalkthroughThis PR is primarily stylistic and documentation: whitespace/formatting normalization, quote-style standardization, adds Ruff config and Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
extract_trajectories.py (2)
395-418: Guard sorting when timestamps are missing.
span.get("start_time")can beNone; sorting with mixedNone/strkeys raisesTypeError. Coalesce to a string (or a default) before sorting.Suggested fix
- trajectories.sort(key=lambda t: t.get("timestamp", ""), reverse=True) + trajectories.sort(key=lambda t: str(t.get("timestamp") or ""), reverse=True)
184-216: Add fallback forgen_ai.usage.total_tokensto prevent data loss.
The code usesgen_ai.usage.*forprompt_tokensandcompletion_tokens, butllm.usage.total_tokensfortotal_tokens. If spans still emit the legacygen_ai.usage.total_tokens, this change will drop it toNone. A safe fallback mirrors the pattern used inphoenix_sync.py.Suggested fix
- return { + total_tokens = attrs.get("llm.usage.total_tokens") + if total_tokens is None: + total_tokens = attrs.get("gen_ai.usage.total_tokens") + + return { "trace_id": span["context"]["trace_id"], "span_id": span["context"]["span_id"], "model": attrs.get("gen_ai.request.model", "unknown"), "timestamp": span.get("start_time"), "messages": openai_messages, "usage": { "prompt_tokens": attrs.get("gen_ai.usage.prompt_tokens"), "completion_tokens": attrs.get("gen_ai.usage.completion_tokens"), - "total_tokens": attrs.get("llm.usage.total_tokens"), + "total_tokens": total_tokens, }, }
🧹 Nitpick comments (1)
AGENTS.md (1)
17-41: Add language specifier to fenced code block.The directory tree code block is missing a language specifier. Adding
textorplaintextsatisfies markdown linters.📝 Proposed fix
## Project Directory Tree (Some files omitted for brevity) -``` +```text . ├── demo (Files used by the Claude Code demo)
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@AGENTS.md`:
- Line 18: The fenced code block in AGENTS.md currently uses an unspecified
language; change the opening fence from ``` to ```text so the block (the
tree/list starting with " . ├── demo (Files used by the Claude Code demo)")
specifies its language and renders with proper formatting and syntax
highlighting.
- Line 27: The tree line uses the wrong continuation character; replace the
leading continuation marker in the line containing "backend (Entity Database
Backend implementations, primarily vector databases)" so the vertical
continuation uses the box-drawing character │ instead of ├ (i.e., change the
tree prefix from "├ ├──" to "│ ├──" so the tree structure renders
correctly).
- Line 56: The command in AGENTS.md contains a stray trailing double-quote;
update the text `To override and run all: `uv run pytest -m 'e2e or unit or
phoenix'"` to remove the extra quote so it reads `To override and run all: uv
run pytest -m 'e2e or unit or phoenix'` (i.e., delete the final `"` character).
Currently Bob will often make some very consistent errors when doing basic things like running unit tests.
Asking Bob for a feedback loop in making a high quality
AGENTS.mdfile resulted in thisThe rest of the changes are linting and formatting changes introduced by
ruff.Summary by CodeRabbit
Documentation
Chores
Style / Refactor
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.