-
Notifications
You must be signed in to change notification settings - Fork 372
chore: integrate Claude Code #8254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…4e7de60d508df7149f79dd6b7e8c6b Image tag: de9bafc7cf17b0213ff7ce7883cd21f8d538b5c4fe16b5d7aac9074108f256bf
|
Run URL: https://github.com/dfinity/ic/actions/runs/20799437251 New container image: |
…11a6d56941a7c45574870843e92ecc Image tag: fce88279927e39e73aeee10f40121761adf272500f61045c9f1506b0c628c37e
|
Run URL: https://github.com/dfinity/ic/actions/runs/20851800107 New container image: |
…xecuted from within it
What?
Add support for Claude Code for developing dfinity/ic.
Why?
We should use AI tools more for developing dfinity/ic to increase our productivity.
I had some initial success: using this PR
claudewas able to produce #8287 with about 4 prompts and a bit of manual work.How?
Install the
claudeCLI in the dev container. It's important to haveclauderun in the dev container such that it can easily callcargoandbazelwithout wrapping all those commands inci/container/container-run.sh.Install the Claude Code VS Code extension. For me the extension is not working correctly yet since I can't login for some reason. I need to debug this further with IT.
Add a
.claude/README.mdwith some preliminary notes on how to useclaude.Add a preliminary
.claude/CLAUDE.mdinstructing Claude how to build and test the ic repository.This document is submitted with every prompt. We expect it to be continuously tweaked by every team to optimise their prompting.
Future Work
Add hooks
Consider moving some of the instructions from
.claude/CLAUDE.mdto hooks likecargo fmtandcargo clippyafter modifying .rs files. This will keep the context as small as possible.Add dfinity/ic specific Agent Skills.
Examples:
How to query Apache Superset (or ideally the PostgreSQL DB directly via
psql) for:the most flaky tests,
the slowest tests on PRs,
previous failed / flaky tests runs of a given test,
failure rate of a given test over time,
run time of a given test over time.
How to download a bazel test log from BuildBuddy.
How to debug system-tests.
How to download the IC node logs of a testnet / mainnet from ElasticSearch.
How to query Prometheus in testnets for relevant metrics.
Interesting Reads
Apart from the Claude Code Docs the following are interesting Reads on how to optimize working with Claude Code:
https://medium.com/@joe.njenga/17-best-claude-code-workflows-that-separate-amateurs-from-pros-instantly-level-up-5075680d4c49
https://x.com/i/status/2007179832300581177