Skip to content

AI docs: add Claude Code project configuration#3326

Closed
martin-belanger wants to merge 1 commit intolinux-nvme:masterfrom
martin-belanger:add-claude-cnf-files
Closed

AI docs: add Claude Code project configuration#3326
martin-belanger wants to merge 1 commit intolinux-nvme:masterfrom
martin-belanger:add-claude-cnf-files

Conversation

@martin-belanger
Copy link
Copy Markdown

Summary

Add project-scoped Claude Code configuration so that AI coding assistants get consistent, accurate context about this repository out of the box. These files are intentionally committed and shared with all contributors — anyone using Claude Code (CLI, IDE extension, or web) will benefit automatically.

What is added

CLAUDE.md — a project guide loaded by Claude at the start of every session. Covers:

  • Repository layout and key files
  • Build system (Meson commands and options)
  • Command and plugin architecture
  • Argument parsing conventions (OPT_* macros, NVME_ARGS)
  • Output/print flags
  • Code style (tabs, 80-column limit, Linux kernel brace style, naming)
  • libnvme internals (accessors, ABI version scripts, NVMe-oF footprint)
  • Testing and CI overview

.claude/rules/ — five rule files with actionable constraints that go beyond background knowledge:

File Content
commit-messages.md <subject>: <summary> format; Signed-off-by requirement; Assisted-by tag when AI-assisted
license-headers.md LGPL-2.1-or-later for libnvme/; GPL-2.0-or-later for CLI and plugins
api-naming.md libnvme_ vs libnvmf_ prefix rules and their ABI consequences
accessor-workflow.md When and how to regenerate accessors; manual .ld version-section rules
git-workflow.md Never commit or push without explicit user approval

.gitignore — extended to track the shared files above while excluding personal/local overrides that must not be committed:
CLAUDE.local.md
.claude/settings.local.json
.claude/memory/
.claude/todos/

What is intentionally NOT included

  • Personal preferences or per-user settings (settings.local.json stays in the parent directory, outside the repo)
  • Session data (memory/, todos/) — ephemeral and user-specific
  • Anything that encodes one contributor's workflow over another's

Add CLAUDE.md and .claude/rules/ to give AI coding assistants shared,
project-scoped context. These files are intentionally committed so all
contributors benefit from the same guidance without each having to
rebuild it from scratch.

CLAUDE.md covers project layout, build system, command and plugin
architecture, code style, libnvme internals, testing, and CI.

.claude/rules/ adds five rule files with actionable constraints that
go beyond background knowledge:
  - commit-messages.md  commit format and Signed-off-by requirement
  - license-headers.md  SPDX identifier selection (GPL vs LGPL by dir)
  - api-naming.md       libnvme_ vs libnvmf_ prefix rules and ABI impact
  - accessor-workflow.md when/how to regenerate accessors; .ld hygiene
  - git-workflow.md     never commit or push without explicit approval

.gitignore is extended to track the shared files above while excluding
personal overrides (CLAUDE.local.md, .claude/settings.local.json) and
session-local data (.claude/memory/, .claude/todos/).

Signed-off-by: Martin Belanger <Martin.Belanger@dell.com>
Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@martin-belanger
Copy link
Copy Markdown
Author

Closing as per our discussion this belongs in a separate repo

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