Conversation
- Added test file co-location conventions to Testing Strategy section in AGENTS.md - Created .claude/settings.json with Claude Code permissions and plansDirectory setting - Created .cursor/cli.json with Cursor CLI permissions - Created .codex/config.toml with Codex skills configuration - Updated gitignores to use whitelist pattern (allow specific files instead of blacklist) - Generated GitHub Copilot and Cursor rule files from updated AGENTS.md Co-Authored-By: Claude (claude-haiku-4-5) <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ PR preview is ready!
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
There was a problem hiding this comment.
Pull request overview
This PR adds AI agent configuration files and enhances documentation by adding test file co-location conventions to help AI agents understand the project structure better.
Changes:
- Added detailed test file location conventions to the Testing Strategy section across three documentation files (AGENTS.md, .github/copilot-instructions.md, .cursor/rules/overview.mdc)
- Created configuration files for three AI coding assistants: Claude Code (.claude/settings.json), Cursor (.cursor/cli.json), and Codex (.codex/config.toml) with appropriate command permissions
- Updated gitignore files for .claude/, .cursor/, and .codex/ directories to use whitelist patterns for better security
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| AGENTS.md | Added test file co-location details to Testing Strategy section |
| .github/copilot-instructions.md | Added test file co-location details to Testing Strategy section (identical to AGENTS.md) |
| .cursor/rules/overview.mdc | Added test file co-location details to Testing Strategy section (identical to AGENTS.md) |
| .cursor/cli.json | New file: Cursor CLI configuration with shell command permissions for make, uv, yarn, and gh |
| .cursor/.gitignore | Updated to use whitelist pattern, ignoring all files by default and explicitly allowing specific tracked files |
| .codex/config.toml | New file: Codex configuration registering two skills from .claude/skills/ directory |
| .codex/.gitignore | New file: Whitelist pattern gitignore allowing only .gitignore and config.toml |
| .claude/settings.json | Added plansDirectory and permissions configuration with allow/ask lists for bash commands |
| .claude/.gitignore | Updated to use whitelist pattern, explicitly allowing specific files in hooks/ and skills/ directories |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Run `ruff check --fix` before `ruff format` per ruff's recommended order: linting fixes can modify code (e.g., removing unused imports), so formatting should run last to ensure consistent style. Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Replace explicit skill configurations in .codex/config.toml with a symlink to .claude/skills/. Codex auto-discovers skills in .codex/skills/ and follows symlinks, so this provides a single source of truth. Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
The config file is no longer needed since skills are auto-discovered via the symlink to .claude/skills/. Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Adds an async hook that runs `ruff check --fix` and `ruff format` on Python files after Edit/Write operations. The hook: - Runs asynchronously so Claude continues working - Only processes .py files - Respects ruff's exclusions from pyproject.toml - Never fails on unfixable lint errors (just applies what it can) Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
- Remove async flag to prevent race conditions with concurrent edits - Reduce timeout to 5s (ruff is very fast) - Add Cursor afterFileEdit hook using the same shared script - Update script to handle both Claude and Cursor input formats Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Move ruff-specific comments closer to the ruff commands and remove outdated async reference. Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Use ${CLAUDE_PROJECT_DIR:-$CURSOR_PROJECT_DIR} to support running the
hook in both Claude Code and Cursor environments.
Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
There was a problem hiding this comment.
just a symlink to the .claude/skills folder
| echo "=== Python: format (ruff) ===" && \ | ||
| uv run ruff format $$PY_FILES && \ | ||
| echo "" && \ | ||
| echo "=== Python: lint (ruff) ===" && \ | ||
| uv run ruff check --fix $$PY_FILES && \ | ||
| echo "" && \ |
There was a problem hiding this comment.
the recommended way in ruff is to first apply check fixes and then the formatting
| echo "=== Python: format (ruff) ===" && \ | ||
| uv run ruff format $$PY_FILES && \ | ||
| echo "" && \ |
There was a problem hiding this comment.
the recommended way in ruff is to first apply ruff check auto fixes and then the formatting.
There was a problem hiding this comment.
Ruff format and check is extremely fast, especially on single files. Therefore, I think its fine to always run this in auto-fix mode after every file write or edit
📉 Frontend coverage change detectedThe frontend unit test (vitest) coverage has decreased by 0.0500%
💡 Consider adding more unit tests to maintain or improve coverage. |
Document that theming and layout calculations should be done in the
frontend, not the Python backend. Using get_option("theme.primaryColor")
is unreliable since themes can be configured in multiple ways.
Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Move the theming and layout section from lib/AGENTS.md to the more specific lib/streamlit/AGENTS.md, which contains guidelines specific to Streamlit library development. Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Imports should be at the top-level of test files unless there is a specific reason to place them inside test functions. Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Exit silently if CLAUDE_PROJECT_DIR/CURSOR_PROJECT_DIR is unset or doesn't exist, preventing the script from running in the wrong directory. Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com>
| "Bash(uv sync *)", | ||
| "Bash(uv pip *)", | ||
| "Bash(yarn *)", | ||
| "Bash(gh *)", |
There was a problem hiding this comment.
suggestion: We should limit the gh subcommands to read-only commands.
Summary
Updates AI agent configurations and improves development tooling:
.claude/skills/for skill auto-discoverymake checkandmake autofix(lint first, then format per ruff docs)Changes
AI Agent Configurations
.claude/settings.json: Command permissions and hooks configuration.codex/skills→.claude/skills/: Symlink for shared skill auto-discovery.cursor/rules/: Updated Cursor rules.github/copilot-instructions.md: Updated Copilot instructionsNew Hook:
post_edit_autofix.shAsync PostToolUse hook that runs after Edit/Write operations on Python files:
ruff check --fixthenruff format(correct order)pyproject.tomlMakefile Improvements
make checkandmake autofixto runruff check --fixbeforeruff formatAGENTS.md Documentation Updates
lib/streamlit/AGENTS.md: Added theming and layout guidance - theming/layout calculations must be done in the frontend, not the Python backend; avoid usingget_option("theme.primaryColor")in backend codelib/tests/AGENTS.md: Added guidance on imports - imports should be at the top-level of test files unless there is a specific reason (e.g., integration requirements, circular imports)Testing Plan
No additional tests needed. Configuration files are static and the hook has been manually tested.
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.