-
Notifications
You must be signed in to change notification settings - Fork 432
Add basic CLAUDE.md file
#4352
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
Add basic CLAUDE.md file
#4352
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| See [CONTRIBUTING.md](CONTRIBUTING.md) for build commands, testing, code style, and development workflow. | ||
|
|
||
| ## Workspace Structure | ||
|
|
||
| See [README.md](README.md) for the workspace layout and [ARCH.md](ARCH.md) for some additional remark regarding important parts of LDK's architecture. | ||
|
|
||
| ## Development Rules | ||
|
|
||
| - Always ensure tests pass before committing. To this end, you should run the test suite via `./ci/ci-tests.sh`. | ||
| - Run `cargo +1.75.0 fmt --all` after every code change | ||
tnull marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I think we should make this a hook in a claude settings file. I think that might be more reliable.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, that seems redundant wit git hooks to me? But feel free to open a follow-up.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not a pre-commit hook. It is a post file edit hook, so formatting remains consistent continuously. |
||
| - Never add new dependencies unless explicitly requested | ||
| - Please always disclose the use of any AI tools in commit messages and PR descriptions using a `Co-Authored-By:` line. | ||
| - When adding new `.rs` files, please ensure to always add the licensing header as found, e.g., in `lightning/src/lib.rs` and other files. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is always practical when working on draft branches?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably it is possible to specify it in a way that we can ask claude to run the CI checks? But do not assume to run it always?
On mine I have
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, but ensuring tests pass before committing is kinda important, no? And in my experience it will allow Claude to catch a lot of bugs? Any suggestion for a good replacement, maybe
cargo test, which should be considerably faster, even if it doesn't catch everything?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it can be:
Always run tests before committing, unless the commit message contains "WIP" or "draft" (case-insensitive).
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems tailored to your specific workflow. Maybe you want to put that in your
.claude.local.mdoverride instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try to override the testing behavior.
It isn't my workflow to prepend the commit titles, but I could adopt that as the workflow potentially.
Let's go with what you have and see how it works out, and adapt if necessary