chore(claude): add claude code support for maintainers#1445
chore(claude): add claude code support for maintainers#1445
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1445 +/- ##
=======================================
Coverage 90.67% 90.67%
=======================================
Files 226 226
Lines 7205 7205
=======================================
Hits 6533 6533
Misses 672 672 ☔ View full report in Codecov by Sentry. |
WilliamBergamin
left a comment
There was a problem hiding this comment.
Awesome working putting this together 💯 Looking forward on iterating on this 🚀
What do you think about centralizing this information by putting the contents of .claude/CLAUDE.md into an AGENTS.md and having the .claude/CLAUDE.md be something like
# CLAUDE.md
Persistent context, coding standards, and instructions for AI coding agents have been centralized to `AGENTS.md`.
**CRITICAL INSTRUCTION:** Before answering any questions, writing any code, or executing any commands in this repository, you MUST read the `AGENTS.md` file located in the root directory.
Proceed by silently reading `./AGENTS.md`, do not ask for permission to read it; just do it.| @@ -0,0 +1,3 @@ | |||
| CLAUDE.local.md | |||
| settings.local.json | |||
| worktrees/ | |||
There was a problem hiding this comment.
| worktrees/ | |
| worktrees/ | |
| plans/ |
|
|
||
| ## Environment Setup | ||
|
|
||
| A virtual environment (`.venv`) should be activated before running any commands. If tools like `black`, `flake8`, or `pytest` are not found, ask the user to activate the venv. |
There was a problem hiding this comment.
In my workflow I use various env_3.x. pattern in order quickly and easily test against different python versions locally 🤔
| A virtual environment (`.venv`) should be activated before running any commands. If tools like `black`, `flake8`, or `pytest` are not found, ask the user to activate the venv. | |
| A python virtual environment (`venv`) should be activated before running any commands. You can verify that the virtual environment is active by checking if the `$VIRTUAL_ENV` environment variable is set with `echo $VIRTUAL_ENV`. | |
| If tools like `black`, `flake8`, 'mypy' or `pytest` are not found, ask the user to activate the venv. |
| ```bash | ||
| pip install -U -e . | ||
| pip install -U -r requirements/testing.txt | ||
| pip install -U -r requirements/adapter.txt | ||
| pip install -U -r requirements/adapter_testing.txt | ||
| pip install -U -r requirements/tools.txt | ||
| ``` |
There was a problem hiding this comment.
What do you think about creating a scripts/install.sh that contains the following
#!/bin/bash
# Installs all dependencies of the project
# ./scripts/install.sh
# Update pip to prevent warnings
pip install -U pip
# The package causes a conflict with moto
pip uninstall python-lambda
pip install -U -e .
pip install -U -r requirements/testing.txt
pip install -U -r requirements/adapter.txt
pip install -U -r requirements/adapter_testing.txt
pip install -U -r requirements/tools.txt
# To avoid errors due to the old versions of click forced by Chalice
pip install -U pip clickUpdate the scripts/install_all_and_run_tests.sh to use it, that way we have one source of truth to install all dependencies
| ```bash | |
| pip install -U -e . | |
| pip install -U -r requirements/testing.txt | |
| pip install -U -r requirements/adapter.txt | |
| pip install -U -r requirements/adapter_testing.txt | |
| pip install -U -r requirements/tools.txt | |
| ``` | |
| ```bash | |
| ./scripts/install.sh |
| - **`App` / `AsyncApp`** (`slack_bolt/app/`) -- Central class. Registers listeners via decorators (`@app.event()`, `@app.action()`, `@app.command()`, `@app.message()`, `@app.view()`, `@app.shortcut()`, `@app.options()`, `@app.function()`). Dispatches incoming requests through middleware to matching listeners. | ||
| - **`Middleware`** (`slack_bolt/middleware/`) -- Abstract base with `process(req, resp, next)`. Built-in: authorization, request verification, SSL check, URL verification, assistant, self-event ignoring. | ||
| - **`Listener`** (`slack_bolt/listener/`) -- Has matchers, middleware, and an ack/handler function. `CustomListener` is the main implementation. | ||
| - **`ListenerMatcher`** (`slack_bolt/listener_matcher/`) -- Determines if a listener handles a given request. Built-in matchers for events, actions, commands, messages (regex), shortcuts, views, options. |
There was a problem hiding this comment.
| - **`ListenerMatcher`** (`slack_bolt/listener_matcher/`) -- Determines if a listener handles a given request. Built-in matchers for events, actions, commands, messages (regex), shortcuts, views, options. | |
| - **`ListenerMatcher`** (`slack_bolt/listener_matcher/`) -- Determines if a listener handles a given request. Built-in matchers for events, actions, commands, messages (regex), shortcuts, views, options, functions. |
| - **`Middleware`** (`slack_bolt/middleware/`) -- Abstract base with `process(req, resp, next)`. Built-in: authorization, request verification, SSL check, URL verification, assistant, self-event ignoring. | ||
| - **`Listener`** (`slack_bolt/listener/`) -- Has matchers, middleware, and an ack/handler function. `CustomListener` is the main implementation. | ||
| - **`ListenerMatcher`** (`slack_bolt/listener_matcher/`) -- Determines if a listener handles a given request. Built-in matchers for events, actions, commands, messages (regex), shortcuts, views, options. | ||
| - **`BoltContext`** (`slack_bolt/context/`) -- Dict-like object passed to listeners with `client`, `say()`, `ack()`, `respond()`, `complete()`, `fail()`, plus event metadata (`user_id`, `channel_id`, `team_id`). |
There was a problem hiding this comment.
| - **`BoltContext`** (`slack_bolt/context/`) -- Dict-like object passed to listeners with `client`, `say()`, `ack()`, `respond()`, `complete()`, `fail()`, plus event metadata (`user_id`, `channel_id`, `team_id`). | |
| - **`BoltContext`** (`slack_bolt/context/`) -- Dict-like object passed to listeners with `client`, `say()`, `ack()`, `respond()`, `complete()`, `fail()`, plus event metadata (`user_id`, `channel_id`, `team_id`, etc...). |
|
|
||
| Always use the project scripts instead of calling `pytest` directly: | ||
| ```bash | ||
| # Run all tests (installs deps, formats, lints, tests, typechecks) |
There was a problem hiding this comment.
| # Run all tests (installs deps, formats, lints, tests, typechecks) | |
| # Install all dependencies and run all tests (installs deps, formats, lints, tests, typechecks) |
| "Bash(./scripts/install_all_and_run_tests.sh:*)", | ||
| "Bash(./scripts/lint.sh:*)", | ||
| "Bash(./scripts/run_mypy.sh:*)", | ||
| "Bash(./scripts/run_tests.sh:*)", |
There was a problem hiding this comment.
| "Bash(./scripts/run_tests.sh:*)", | |
| "Bash(./scripts/run_tests.sh:*)", | |
| "Bash(./scripts/install.sh:*)", | |
| "Bash(echo $VIRTUAL_ENV)", |
Summary
This PR adds support for
claudewith the current project settings generated with the following command and a few adjustments:Permissions were gathered from similar changes to the CLI repo:
🔗 https://github.com/slackapi/slack-cli/blob/main/.claude/settings.json
Testing
We might make updates to these files as we find edges?
Category
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
./scripts/install_all_and_run_tests.shafter making the changes.