Hi Yuan,

+1 on this proposal.

The addition of CLAUDE.md looks very helpful and well-structured. It should
significantly improve the experience for contributors using AI-assisted
tools by providing accurate, project-specific guidance instead of generic
suggestions.

Best regards,

Wenwei

Yuan Tian <[email protected]> 于2026年4月11日周六 17:45写道:

> Hi all,
>
> I'd like to propose adding Claude Code [1] project-level configuration
> to the IoTDB repository. The goal is to help developers who use Claude
> Code (an AI coding assistant) get consistent, high-quality assistance
> when working on IoTDB.
>
> PR: https://github.com/apache/iotdb/pull/17458
>
> ## What is Claude Code?
>
> Claude Code is an AI-powered coding assistant by Anthropic that runs in
> the terminal. It can read, write, and reason about code. Project-level
> configuration files tell it how to build, test, and follow the
> conventions of a specific codebase.
>
> ## What's being added?
>
> ### 1. `CLAUDE.md` — Project instruction file
>
> A comprehensive guide that Claude Code reads at the start of every
> session. It covers:
>
> - Project overview and architecture (ConfigNode, DataNode, AINode,
>   dual data model)
> - Build commands (full build, per-module, single test class/method)
> - Integration test commands (all profiles: tree/table, simple/cluster)
> - Code style rules (Spotless, Checkstyle, import order, license header)
> - Key subsystem descriptions (queryengine, storageengine, schemaengine,
>   pipe, consensus, etc.)
> - IDE setup instructions (Thrift/ANTLR generated sources)
> - Common pitfalls (missing Thrift compiler, pre-existing compile errors,
>   Gson compatibility)
>
> This ensures any developer using Claude Code gets accurate,
> IoTDB-specific guidance instead of generic answers.
>
> ### 2. `.claude/settings.json` — Shared project hooks
>
> Configures a PostToolUse hook that automatically runs
> `mvn spotless:apply` on Java files after Claude Code edits them.
> This guarantees all AI-generated code changes comply with our
> Spotless formatting rules — no more format-violation build failures
> from AI-assisted edits.
>
> ### 3. `.gitignore` refinement
>
> The previous `.gitignore` entry ignored the entire `.claude/` directory
> and `CLAUDE.md`, which prevented sharing any configuration with the
> team. The updated rules are more fine-grained:
>
> Ignored (machine-specific, ephemeral):
> - `.claude/settings.local.json` — personal local settings
> - `.claude/todos/` — session-level task tracking
> - `.claude/worktrees/` — temporary git worktree directories
> - `.claude/scheduled_tasks.json` — session-level scheduled tasks
>
> Committed (shared with team):
> - `CLAUDE.md` — project instructions, benefits everyone
> - `.claude/settings.json` — shared hooks (e.g., auto-formatting)
>
> ## Impact
>
> - These files have ZERO impact on the build, tests, or runtime behavior
>   of IoTDB.
> - Developers who don't use Claude Code will not be affected at all.
> - Developers who do use Claude Code will get better, more consistent
>   assistance out of the box.
>
> Please share your thoughts or concerns. If there are no objections,
> I will merge this PR.
>
> [1] https://docs.anthropic.com/en/docs/claude-code
>
> Best regards,
> ----------------
> Yuan Tian
>

Reply via email to