Skip to content

Conversation

@tnull
Copy link
Contributor

@tnull tnull commented Jan 27, 2026

We add a basic CLAUDE.md file pointing it to some workspace specifics (in particular running cargo fmt on 1.75.0 MSRV, and using ./ci/ci-tests.sh to run tests).

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jan 27, 2026

👋 Thanks for assigning @joostjager as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tnull
Copy link
Contributor Author

tnull commented Jan 27, 2026

@joostjager @TheBlueMatt Anything else that you deem worthy to add?

@tnull tnull force-pushed the 2026-01-add-claude-md branch 2 times, most recently from cd6ac32 to ecf8c05 Compare January 27, 2026 11:51
TheBlueMatt
TheBlueMatt previously approved these changes Jan 27, 2026
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing comes to mind, we can definitely iterate on it.

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.09%. Comparing base (9e91b2e) to head (ecf8c05).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4352   +/-   ##
=======================================
  Coverage   86.08%   86.09%           
=======================================
  Files         156      156           
  Lines      102428   102428           
  Branches   102428   102428           
=======================================
+ Hits        88179    88181    +2     
+ Misses      11754    11753    -1     
+ Partials     2495     2494    -1     
Flag Coverage Δ
tests 86.09% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


## Development Rules

- Always ensure tests pass before committing. To this end, you should run the test suite via `./ci/ci-tests.sh`.
Copy link
Contributor

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?

Copy link
Contributor

@vincenzopalazzo vincenzopalazzo Jan 27, 2026

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

### When to run CI checks
- When explicitly asked (e.g., "run CI", "check CI", "verify commits")
- Before creating a PR (if requested)
- After fixing CI-related issues

Copy link
Contributor Author

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?

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?

Copy link
Contributor

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).

Copy link
Contributor Author

@tnull tnull Jan 28, 2026

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).

That seems tailored to your specific workflow. Maybe you want to put that in your .claude.local.md override instead?

Copy link
Contributor

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

CLAUDE.md Outdated
- 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
- Never add new dependencies unless explicitly requested
- Please always disclose the use of any AI tools in commit messages and PR descriptions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify how this should be disclosed, maybe a standard sentence to add for consistency?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consistently require it disclose itself as HAL 9000 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify how this should be disclosed, maybe a standard sentence to add for consistency?

I don't know - do you have a specific example in mind? Otherwise above instructions worked pretty well for me so far.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just put what it produced for you in here? Or just specifiy that it should use co-authored-by

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just put what it produced for you in here? Or just specifiy that it should use co-authored-by

Done:

diff --git a/CLAUDE.md b/CLAUDE.md
index 51bbe1d90..611322c12 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -14,4 +14,4 @@ See [README.md](README.md) for the workspace layout and [ARCH.md](ARCH.md) for s
 - Run `cargo +1.75.0 fmt --all` after every code change
 - Never add new dependencies unless explicitly requested
-- Please always disclose the use of any AI tools in commit messages and PR descriptions
+- 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.

We add a basic `CLAUDE.md` file pointing it to some workspace specifics
(in particular running `cargo fmt` on 1.75.0 MSRV, and using
`./ci/ci-tests.sh` to run tests).

Signed-off-by: Elias Rohrer <dev@tnull.de>
@tnull tnull force-pushed the 2026-01-add-claude-md branch from d987453 to 8b1386c Compare January 28, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants