Skip to content

Comments

Add critical instructions and hooks for Claude Code#8715

Merged
mergify[bot] merged 12 commits intosigp:unstablefrom
dapplion:claude-md-improvements
Feb 18, 2026
Merged

Add critical instructions and hooks for Claude Code#8715
mergify[bot] merged 12 commits intosigp:unstablefrom
dapplion:claude-md-improvements

Conversation

@dapplion
Copy link
Collaborator

@dapplion dapplion commented Jan 28, 2026

Summary

  • Add CRITICAL section at top of CLAUDE.md to ensure Claude always runs formatting and linting after code changes
  • Add .claude/settings.json with post-tool-call hook to remind about formatting and linting after Edit/Write operations

This helps ensure Claude Code consistently follows the project's code quality requirements.

Test plan

  • Verify CLAUDE.md changes are visible
  • Verify hook configuration is valid JSON

🤖 Generated with Claude Code

(Lion here)

Claude recognizes that it ignored Claude.md most of the time, and recommends this edits to actually lint and format when doing changes.

- Add CRITICAL section at top of CLAUDE.md to ensure Claude always runs
  `cargo fmt --all && make lint-fix` and `cargo check` after code changes
- Add .claude/settings.json with post-tool-call hook to remind about
  formatting and linting after Edit/Write operations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dapplion dapplion requested a review from jimmygchen January 28, 2026 19:23
@michaelsproul
Copy link
Member

I thought the plan was to add a commit hook that checks cargo fmt, so this is enforced by Git and not vibes

@dapplion
Copy link
Collaborator Author

dapplion commented Feb 5, 2026

I thought the plan was to add a commit hook that checks cargo fmt, so this is enforced by Git and not vibes

Do we want to have git hooks that apply to everyone?

"hooks": [
{
"type": "command",
"command": "echo '\n[Reminder] Run: cargo fmt --all && make lint-fix && cargo check'"
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need cargo check if we already run clippy

Copy link
Member

Choose a reason for hiding this comment

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

I'm removing the cargo check command and merging this - please correct me if i wrong

Copy link
Member

@pawanjay176 pawanjay176 left a comment

Choose a reason for hiding this comment

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

@dapplion I'm wondering why we can't have our own local versions of the settings.json. Why does this need to be committed for everyone?

@jking-aus
Copy link
Member

jking-aus commented Feb 10, 2026

@dapplion I'm wondering why we can't have our own local versions of the settings.json. Why does this need to be committed for everyone?

settings.json at project level is good for sharing hooks and tooling across the team. Your .claude/settings.local.json is not committed and overrides the project level settings

https://code.claude.com/docs/en/settings

Add instructions for installing git hooks and cargo toolchain
@dapplion dapplion added the ready-for-merge This PR is ready to merge. label Feb 18, 2026
@mergify mergify bot added the queued label Feb 18, 2026
Removed 'cargo check' from reminder command in settings.
@mergify
Copy link

mergify bot commented Feb 18, 2026

Merge Queue Status

Rule: default


  • Entered queue2026-02-18 02:53 UTC
  • 🚫 Left the queue2026-02-18 02:54 UTC · at 1023d6fd54318c2b17a654fd7edbc19854ee4046

This pull request spent 42 seconds in the queue, with no time running CI.

Reason

The pull request #8715 has been manually updated

Hint

If you want to requeue this pull request, you can post a @mergifyio queue comment.

Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mergify
Copy link

mergify bot commented Feb 18, 2026

Merge Queue Status

Rule: default


This pull request spent 31 minutes 2 seconds in the queue, including 29 minutes 18 seconds running CI.

Required conditions to merge
  • check-success=local-testnet-success
  • check-success=test-suite-success

mergify bot added a commit that referenced this pull request Feb 18, 2026
@mergify mergify bot merged commit c4ff9b1 into sigp:unstable Feb 18, 2026
36 checks passed
@mergify mergify bot removed the queued label Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-docs ready-for-merge This PR is ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants