Skip to content

docs: add coding guidelines to CLAUDE.md#91

Merged
aireilly merged 1 commit intomainfrom
update-claude
Apr 17, 2026
Merged

docs: add coding guidelines to CLAUDE.md#91
aireilly merged 1 commit intomainfrom
update-claude

Conversation

@aireilly
Copy link
Copy Markdown
Member

@aireilly aireilly commented Apr 17, 2026

Taken from Andrej Karpathy's Skills repo.

Summary

  • Adds a "Coding guidelines" section to CLAUDE.md with four behavioral rules: think before coding, simplicity first, surgical changes, and goal-driven execution
  • Sourced from proven LLM coding mistake reduction guidelines, trimmed to avoid redundancy with Claude Code's built-in system prompt
  • Placed before project-specific conventions so guidelines are read first

Test plan

  • Verify CLAUDE.md renders correctly on GitHub
  • Confirm no conflicts with existing project conventions in AGENTS.md
  • Validate guidelines don't duplicate system prompt behavior excessively

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Internal documentation updates only. No user-facing changes in this release.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 17, 2026

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ef26785a-33fe-4862-9c4b-872ea3854465

📥 Commits

Reviewing files that changed from the base of the PR and between 25429f6 and 85c31d8.

📒 Files selected for processing (1)
  • CLAUDE.md

Walkthrough

Updated CLAUDE.md with three new documentation sections: "Coding guidelines", "Surgical changes", and "Goal-driven execution". No functional code, exported entities, or control-flow logic were modified.

Changes

Cohort / File(s) Summary
Documentation Updates
CLAUDE.md
Added "Coding guidelines" outlining behavioral rules (state assumptions, stop when unclear, prefer simplicity, avoid unnecessary changes). Added "Surgical changes" guidance for targeted edits and limited cleanup. Added "Goal-driven execution" requiring verifiable goals and numbered plans with per-step verification.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: add coding guidelines to CLAUDE.md' clearly and accurately summarizes the main change: adding documentation/guidelines to a specific file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
No Real People Names In Style References ✅ Passed The CLAUDE.md file contains no references to real people by name used as style references, examples, or in any context that would violate the custom check requirements.
Git Safety Rules ✅ Passed The pull request only adds documentation in CLAUDE.md and introduces no git commands, so there are no hardcoded remote names, unsafe pushes to main/master, or force-push operations.
No Untrusted Mcp Servers ✅ Passed PR introduces no new MCP server dependencies or untrusted installations; all MCP mentions are informational documentation or explicit security restrictions.
Skill And Script Conventions ✅ Passed The pull request adds documentation to CLAUDE.md that correctly adheres to all skill naming and script invocation conventions without plugin: prefixes or slash-command syntax.
Plugin Registry Consistency ✅ Passed The custom check for Plugin Registry Consistency is not applicable to this PR as only CLAUDE.md was modified with no changes to plugin-related files.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-claude

Comment @coderabbitai help to get the list of available commands and usage tips.

Merge behavioral guidelines (think before coding, simplicity first,
surgical changes, goal-driven execution) to reduce common LLM coding
mistakes across the project.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

Signed-off-by: Aidan Reilly <[email protected]>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Around line 47-51: The fenced code block containing the three checklist lines
currently has no language tag (the block that starts with the triple backticks
followed by "1. [Step] → verify..."); add a language identifier (e.g., use
"text" or "plain") after the opening ``` so it becomes ```text to satisfy MD040
and ensure consistent rendering for that fenced block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d9d1bb2a-7dec-46b4-ae3f-80b6f5ad94c9

📥 Commits

Reviewing files that changed from the base of the PR and between c33ca22 and 25429f6.

📒 Files selected for processing (1)
  • CLAUDE.md

Comment thread CLAUDE.md
Comment on lines +47 to +51
```
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add a language tag to the fenced block.

Line 47 opens a fenced code block without a language, which triggers MD040 and reduces renderer/tooling consistency.

Suggested fix
-```
+```text
 1. [Step] → verify: [check]
 2. [Step] → verify: [check]
 3. [Step] → verify: [check]
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 47-47: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` around lines 47 - 51, The fenced code block containing the three
checklist lines currently has no language tag (the block that starts with the
triple backticks followed by "1. [Step] → verify..."); add a language identifier
(e.g., use "text" or "plain") after the opening ``` so it becomes ```text to
satisfy MD040 and ensure consistent rendering for that fenced block.

@aireilly aireilly merged commit 1a214e9 into main Apr 17, 2026
6 of 7 checks passed
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.

1 participant